But it works fine in an xterm.

I've completely apt removed all things vim and re-installed vim-gtk. I've confirmed that +clipboard and +xterm_clipboard are present. I've removed and re-installed the package repeatedly. I just built vim from the latest sources on github. I've cleared the mouse option (e.g. set mouse= ) and run vim without my config (-u NONE) to no avail.

setting clipboard=unnamed or clipboard=unnamed,unnamedplus works fine in an xterm.

copying to the system clipboard via "*y works find in xterm.

Always the same result. xterm yes. gnome-terminal no.

I cannot figure it out. What am I missing?

EDIT: The title isn't totally accurate as it turns out. In my case, yanking within vim in a gnome-terminal does use the system clipboard. I can paste the contents into any other app. But if I background vim and then try to paste the contents into another app (including the terminal) it doesn't work. Again, works fine in xterm.


Try installing vim-gnome. That's what made it work for me.

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.