- Mark the location of the first character of the block of text you want to copy by pressing mx This marks the begining of the text to be copied into a buffer 'x'.
- Move the cursor over the last character of the block of text you want to copy and press (shift)+x By pressing shift you are moving all the characters from mark to the current position into a buffer.
- To copy (or, in vi terminology, to yank the buffered text) press y'x This will yank everything from the buffer x. ('tick' character ' is command in vi to read from the named buffer)
- Now move the cursor above the location where you want to paste the yanked text and press p p (for paste) will insert the copied (yanked) text at the line below the cursor.
Blog on things around me - Quality Management, Free & Open Source Software, Gadgets, Utilities...
Friday, March 6, 2009
Copy/Paste the block of text in vi/vim
Subscribe to:
Post Comments (Atom)
Total Pageviews
Popular Posts
-
Here is the list of Online Hindi Radio Stations. Copy the URL in your media player and enjoy !! 106.2 HUMFM - UAE ==> http://www.humfm.c...
-
There are four types of JDBC database driver: The JDBC/ODBC bridge driver (Type 1) A piece of native C-code that translates a JDBC call to ...
-
Here are a few of the JDBC Performance pointers. Hopefully, there are a lot more, which you may be aware of, but not mentioned here. Care to...
-
I just decied to look for a few commonly used UNIX command. A quick Google produces a lot more, but here are a list of more useful commands...
-
Always give your 100% to work... :) [received in an email]
2 comments:
why not use:
(for five lines)
:y5
move curson
p
just what i was looking for, thanks!
Post a Comment