svermeulen / vim-easyclip

Simplified clipboard functionality for Vim
696 stars 21 forks source link

Make M replace D #84

Closed supercrabtree closed 8 years ago

supercrabtree commented 8 years ago

Seeing as the plugin already steals m it would make sense for it to steal M too. Maybe.

Currently getting around this with:

nnoremap M YD

Seems a bit weird to take away D's functionality and not give it back.

svermeulen commented 8 years ago

A lot of people use M though, so it's probably safest to let people override it themselves. The defaults in Vim are also a bit weird here since it doesn't map Y by default. Which actually makes me wonder how your mapping even works? I'm guessing that the Y there doesn't do anything and that it functions the same as nnoremap M D.

I would suggest instead doing this: nmap M <Plug>MoveMotionEndOfLinePlug

Since then it will properly get added to the yank history

svermeulen commented 8 years ago

Ok I added a note to the README about this. Thanks for the report.