Last Updated: February 25, 2016
· sheerun

Gain clipboard support for Vim on OS X


brew update
brew install vim

Restart terminal, and ensure you have +clipboard in output of:

vim --version | grep clipboard

Then use + register to copy and paste code.

Bonus: read this tooltip by Jan about pasting from any register in Vim

Bonus 2: Make the system clipboard default register for yank.

3 Responses
Add your response


Did the update, it did not enabled clipboard when issuing 'brew install vim'.

Perhaps an option to configure ?

over 1 year ago ·

@niloct It did for me. Ensure which vim is returning the correct binary.

over 1 year ago ·

I had to alter the Formula for brewing vim:

system "./configure", "--prefix=#{HOMEBREW_PREFIX}",
system "make"

Notice the line which enables clipboard. After that brew was successful with +clipboard

over 1 year ago ·