Last Updated: February 25, 2016
·
3.177K
· jandudulski

VimTip#1: paste without escape

Long time ago I found a binding:

imap <C-v> <esc>"+pi

... and added it to my vimrc.

Don't do it. It's useless and wrong.

You can achieve the same with native

<C-r>{register}

binding, which allows you to paste from any register when you are in insert mode.

So, while being in insert mode, instead:

<C-v>

you can use:

<C-r>"

to paste from global register. Or

<C-r>+

to paste from system drop register. Or

<C-r>*

from system select register (only unix/linux) or use any named register as you like.

edit:

You can find more tips like this in the awesome Practical Vim book by Drew Neil http://pragprog.com/book/dnvim/practical-vim