Fandom

Vim Tips Wiki

Word-wise cut, copy and paste

Redirected from VimTip834

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 834 Printable Monobook Previous Next

created 2004 · complexity basic · author andyf · version 6.0


Word-wise cut, copy & paste over the current word. There's nothing special or magical about these bindings, just that I find them really useful for coding, and I thought I'd share.

Add the following lines to vimrc:

map <A-v> viw"+gPb
map <A-c> viw"+y
map <A-x> viw"+x

These bindings follow the Windows-style keys of control-V, control-C, and control-X; except using alt instead of control. Adjust to your preference.

CommentsEdit

I think <Esc>yiw is more convenient.


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.