I access a sever over ssh on which I run vim for editing files. When I try to yank text from vim into an editor locally on my mac (lion) either with y OR \"+y it does not work.
On MacOS, when SSH from machine A to machine B and using vim in machine B, I add this to my .vimrc
in machine B:
nmap yr :call system("ssh $machineA_IP pbcopy", @*)
That way, in normal mode, if you copy something to * register, then type yr
, the content of *
register in vim@machine_B is copied to machine A's local clipboard, assuming you have setup Vim correctly with +clipboard
and *
register