65-xaw
2.615K
· June 2012 ·
Fe0ce83e4e1683c3aeda7cb2160e06a1

VimTip#1: paste without escape

vim

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

Sign in or sign up to add your response.
Featured Programming Job

Software Engineer
·
New York, NY
·
Full Time
Search all programming jobs