vim:keys: Keep cursor position on visual yank
The cursor is always moved to the beginning of the selection when yanking in visual mode. This mapping resets the position back to where it was. Link: https://stackoverflow.com/a/3806664/20927629
This commit is contained in:
@@ -41,6 +41,10 @@ if (has('clipboard'))
|
||||
map <leader>P "+P
|
||||
endif
|
||||
|
||||
" Do not move the cursor to the start of the selection after a yank
|
||||
" https://stackoverflow.com/a/3806664/20927629
|
||||
vmap y ygv<Esc>
|
||||
|
||||
" Ctrl-Backspace should delete words in insert mode and on command-line.
|
||||
noremap! <C-BS> <C-W>
|
||||
map! <C-H> <C-BS>
|
||||
|
||||
Reference in New Issue
Block a user