While I'm running an instance of Vim (version 7.4, in the terminal) I can copy text into the + (Primary Selection) and * (Clipboard Selection) registers. If I switch to another program in a new window/terminal I can paste from these buffers without issue.


  • in terminal one I'm running vim and yank into +,* buffers
  • in terminal two I'm in bash and xclip -o pastes the content of the * buffer
  • in my firefox instance ctrl-v pastes the contents of the + buffer

If I quit vim then the clipboard is purged.

  • xclip -o will output "Error: target STRING not available"
  • ctrl-v does nothing in firefox

If I suspend the vim process (ctrl-z) I get the same result as if I had quit vim. Resuming the process (fg) does not return access to the x11 clipboards, I have to yank to the registers again. This sort of usage is especially bothersome for me.

Is there anything I can do to change this? I'm a novice vim/linux user.

Your Answer

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

Browse other questions tagged or ask your own question.