I have a server running SSH, when I edit a file with vim on the remote server, :y+ doesn't work since the VIM binary on that linux system wasn't compiled with X support.

(E488: Trailing characters)

So how should I share the clipboard? Just transparently like what I do on local system


Use a vim compiled with X support instead, e.g. gvim -v, along with X forwarding in SSH.

  • It's counter-intuitive that this will work even without xserver on the server side. Worked for me on Debian Wheezy server using vim-gtk which replaced old vim (using debian-alternatives) and had only few dependencies. No pulling in of whole xserver to my headless VPS. (Surprisingly enough, the sshd even had X11 forwarding on by default) – Alois Mahdal Jul 10 '13 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.