I am on Ubuntu 14.04.3 and Vim 8.2. I'm trying to figure out how to access either the * or + clipboard on Ubuntu but it seems like it doesn't exist? After doing "*yy and "+yy on lines of text, here is what it shows:

:reg + *
Type Name Content

Neither + or * exists in there. It seems like it's set to use the unnamedplus register:

:echom has('unnamedplus') 
" 1

:echom has('unnamed')
" 0

Then I try doing (again):

:set clipboard=unnamedplus

And doing "+yy again, but still nothing shows up in the register. Is there no 'system clipboard' on ubuntu (accessible by vim), or if so, how can I get that to work?

Also, I've verified my vim is compiled with both clipboard-related options:

  • Do you also have the feature +X11?
    – Ralf
    Jul 1, 2020 at 5:36
  • Please provide more information about your system. Did you start a X-server? Is $DISPLAY correctly set? Are you doing anything unusual, like ssh'ing to a different server? Jul 1, 2020 at 6:26
  • @Ralf yes, that as well (updated question with it)
    – David542
    Jul 1, 2020 at 6:51
  • 1
    Well, if you are using ssh, things are very much complicated. Make sure that $DISPLAY is correctly set, and you need to use ssh -Y or ssh -X for that to work reliable (or the ForwardX11 config option set or whatever it is called). Then you probably also need to be run a local X11 server on your mac (I don't know Mac so this might be wrong). There are probably already questions about this, please search Jul 1, 2020 at 7:05
  • 1
    We already have a lot of similar question example, example and an authoritative answer so I'll close this one. If despite the information in these links you still don't find a solution please edit your question to show exactly what is different from these other ones and cast a vote to reopen the question.
    – statox
    Jul 1, 2020 at 9:15


Browse other questions tagged or ask your own question.