9 years ago
By default, if you delete some text in some way, vim puts it in the default " register. Sometimes you want to remove some text before you paste it back in. That will clobber the " register. These bindings let you remove text into the void register easily.
By default, Leader is \, so \d will delete text without overwriting "", meaning you can spam p without messing with "0 first. Works with a movement or in visual select mode.
nmap <Leader>d "_d nmap <Leader>x "_x nmap <Leader>c "_c nmap <Leader>s "_s nmap <Leader>r "_r nmap <Leader>D "_D nmap <Leader>X "_X nmap <Leader>C "_C nmap <Leader>S "_S vmap <Leader>d "_d vmap <Leader>c "_c vmap <Leader>x "_x vmap <Leader>s "_s vmap <Leader>r "_r
Romain Lafourcade 9 years ago
Please consider using
xmap
instead ofvmap
to actually resctrict your visual mode mappings to visual mode andnoremap
instead ofmap
to avoid remapping issues.