Archive for June, 2009|Monthly archive page

Copy to Mac OS X Clipboard from Vim

Here’s a short, but nifty, addition to your ~/.vimrc that’ll make copying to your Mac’s clipboard a little easier:

map cc :w !pbcopy

Typing ‘cc’ in command mode will put the entire current buffer into the clipboard. If you type ‘cc’ while you have lines selected in visual mode, it’ll only copy those lines.

Woo!

Follow

Get every new post delivered to your Inbox.