Vim Tips Wiki
 
(Undo revision 30604 by 78.53.219.222 (talk) is this related to Vim? how?)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{TipImported
{{Tip
 
 
|id=834
 
|id=834
  +
|previous=832
|title=Word-wise cut, copy & paste
 
  +
|next=835
|created=December 15, 2004 18:55
+
|created=2004
 
|complexity=basic
 
|complexity=basic
 
|author=andyf
 
|author=andyf
 
|version=6.0
 
|version=6.0
 
|rating=2/8
 
|rating=2/8
  +
|category1=
|text=
 
  +
|category2=
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.
 
 
}}
 
 
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
 
 
   
 
Add the following lines to vimrc:
  +
<pre>
 
map <A-v> viw"+gPb
 
map <A-c> viw"+y
 
map <A-x> viw"+x
  +
</pre>
   
 
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.
 
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.
}}
 
   
== Comments ==
+
==Comments==
I think &lt;ESC&gt;yiw is more convenient
+
I think <Esc>yiw is more convenient.
 
'''Anonymous'''
 
, December 20, 2004 18:37
 
----
 
Thanks a lot. Exactly what I was searching for. (:
 
   
dac--AT--outanekka.org
 
, January 31, 2005 11:18
 
 
----
 
----
<!-- parsed by vimtips.py in 0.519329 seconds-->
 

Latest revision as of 07:52, 18 July 2011

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.

Comments[]

I think <Esc>yiw is more convenient.