Vim logo vim online Vim Book Ad

basic Tip #356: Quick yank and paste

 tip karma   Rating 4/8, Viewed by 1437 

created:   October 30, 2002 12:54      complexity:   basic
author:   Niels Aan de Brugh      as of Vim:   5.7

Since I didn't want to interfere with the standard Vim mappings I removed all the <C-c>, <C-v>, etc. mappings found in the default vimrc. But quickly copy-pasting text is a must, so I added the following keymaps. This is very simple, but it works like a charm.

vmap <C-Space> "ay
nmap <C-Space> "aP
imap <C-Space> <C-o>"ap
nmap <C-c> "ayiw

Niels

My vimrc if you're interested: http://home.student.utwente.nl/n.h.m.aandebrugh/_vimrc

 rate this tip  Life Changing Helpful Unfulfilling 

<<Comment Lines according to a given filetype | Adding a console to gdbvim >>

Additional Notes

Anonymous, November 16, 2002 18:04
You might want to post that to http://www.dotfiles.com also. (And have a look around there of course.)
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo