I have an area selected in Vim. How can I copy it into the OS X clipboard?
(The OS X clipboard can be written to via a pipe to /usr/bin/pbcopy)
if you have the +clipboard option on your Vim installation (you can check with :version) and you are in visual mode you can do "+y This will yank the selection to the buffer + that is the clipboard.
I have added the following maps to my vimrc and it works fine.
vmap
: With this I can do leader key follow by y to copy to the clipboard in visual mode.
nmap
: With this I can do leader key follow by p to paste from the clipboard on normal mode.
PD : On Ubuntu I had to install vim-gtk to get the +clipboard option.