Thursday, June 27, 2013

Using Vim to yank and put from the clipboard

Use "*2yy in normal mode to yank two lines into the clipboard.

Then use "*p in normal mode to paste the contents of clipboard register.

Under OS X you can use "+2yy and "+p, too. This is because Vim's quotestar and quoteplus registers are both assigned to the clipboard under OS X.

Note that none of the commands here contains a colon because all commands are issued in normal mode.

 

No comments: