Vim Tips Wiki
Advertisement
Tip 1196 Printable Monobook Previous Next

created April 4, 2006 · complexity basic · author Sply · version 6.0


After you have copied/yanked text into a register, you can paste it, replacing previous text using visual selection.

For example, you can copy one line with 'yy', than point cursor to another line and replace it with previously copied line with 'Vp'.

Or if you want to cut one word and replace with another word: cut the word using 'daw', move cursor onto another word and replace with 'vawp'.

Comments

Advertisement