Vim Tips Wiki

We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{Tip
{{TipImported
 
 
|id=834
 
|id=834
  +
|title=Word-wise cut, copy & paste
|previous=832
 
 
|created=December 15, 2004 18:55
|next=835
 
|created=2004
 
 
|complexity=basic
 
|complexity=basic
 
|author=andyf
 
|author=andyf
 
|version=6.0
 
|version=6.0
 
|rating=2/8
 
|rating=2/8
  +
|text=
|category1=
 
 
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.
|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.
 
  +
 
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 <Esc>yiw is more convenient.
+
I think &lt;ESC&gt;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-->

Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA

Cancel Editing help (opens in new window)