Paste columns in vim

Finaly, after years of searching, i found an almost perfect solution.

I sometimes like to write lists in vim which have 2 columns, or sometimes you copy something from the web and want to have it in two columns.

First you have the text in one column, then you go to the first row you want to have in the second column. Then you enter visual blockmode with Ctrl-V, then you press $, as not all rows will be the same length. Then scroll down with j and select all items you want to have in the second column. Then yank with y, or delete with x, go to the first corner of the second row and paste with p.

Advertisement

~ by princ3 on June 30, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.