Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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