When in select mode (used mouse to select some text) if I delete a chunk of text with the backspace the postion of the cursor moves backward开发者_开发知识库s a few places which is very annoying. I know I should probably never be using the mouse but....its annoying!
With me, a visual selection done with the mouse, is (obviously) not deleted with backspace, but that's probably due the fact that I'm not on a Mac (doesn't a Mac have fewer keys in the delete/backspace department?)
You might get mileage from this type of mapping:
:snoremap <BS> x
It works like a charm with me. If you feel like being adventurous, you might map it to <Del>
even when your physical keyboard doesn't have that key :).
Note that in order to prevent the 'cut' text from being yanked in the default register, change the mapping to be "_x
instead of plain x
On my PCs, mouse selection actually starts a Visual Mode selection, due to the fact that I have behave xterm
in $MYVIMRC, so I needed to do this:
:vnoremap <BS> x
If you want to override the select behaviour back to the default, use
:se selectmode=mouse
精彩评论