Monday, June 13, 2011

Multiple copy buffers in Vim

All these days I have been looking for multiple copy buffers on Windows or Linux, or anywhere. I thought this feature is so cool and useful that I just wanted to see this implemented in some software or other. And finally I am glad to be able to found the feature on a text editor "Vim". 

We all know how Ctrl+C and Ctrl+V works, and how useful it is for most of the mundane text editing tasks we deal with regularly. Doesn't having the ability to do something like Ctrl+C+1 for copying text1, Ctrl+C+2 for copying text2, Ctrl+V+1 for pasting text1 and Ctrl+V+2 for pasting text2. With multiple copy buffers support we can copy as many text we want in computer's memory and paste it whenever necessary while editing text files. 

On Linux, of all the various text browsers available, Vim is my favorite. Reasons - simplicity, speed and capability. And, I was so happy to find the multiple copy buffers feature available on this simple yet powerful text editor. In Vim, you will have to use yy to copy a line and p to paste it elsewhere in Command mode. To copy a line to buffer a, you can use "ayy. To copy a line to buffer b, you can use "byy. To paste the line copied into buffer a, you can "ap. Similarly, to paste the line copied into buffer b, "bp can be used and so on.

Although the notion of using something else apart from the standard Ctrl+C and Ctrl+V for copying and pasting for newbies who haven't used Vim quite often, there is a very high chance of you starting to like this textual editor once you explore its full potential. And, this multiple copy buffers feature only adds to its potential. 


  1. but when i am doing ayy my vim taking me to INSERT mode......

  2. Hitesh -
    There are quotes before ayy.


Your comments are encouragement and motivation! Please leave your feedback -

Related Posts with Thumbnails