Clipboard over SSH with Vim
The following is a simple and easy way to get clipboard sharing with Vim working between two Linux installations (specifically a desktop and remote server).
First install xclip on both your local machine and the server:
Installing xclip will bring along some dependencies like x11-common, but don't worry, you don't need to run an X server on the server to get this working.
Next, enable X11 forwarding on the server. Add the following to /etc/ssh/sshd_config:
Then add the following to the server's ~/.vimrc:
This will remap the
Now you're done. SSH into the server with