I swear I have read every single post and have not found a comprehensive solution that works for me yet. Here is what I have done so far:
HELP?
From this gist:
Install or update XQuartz.app and start it.
In the Preferences window, activate clipboard synchronization.
Quit XQuartz.app.
In iTerm.app or Terminal.app, connect to your remote machine with:
$ ssh -X username@host
and see the XQuartz.app icon pop-up in your Dock.
From now on, XQuartz.app will start automatically in the background when you use the -X flag, taking care of the clipboard synchronization for you.
If you don't already have it, install GVim. On Debian-based systems, use:
$ sudo apt-get install vim-gtk
The idea is not to use Gvim but installing it gets you everything you need to get clipboard sharing to work:
In Vim, synchronize the unnamed and clipboard registers by adding this line to ~/.vimrc:
set clipboard^=unnamed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With