The system is Centos7.2. I have installed vim-enhanced and vim-X11, used vimx command.

It shows that vimx supports clipboard and xterm_clipboard. But in vimx, there is no reg + and reg *. I can't copy text to system clipboard using command "+yy

supporting clipboard and xterm_clipboard there is no register + and *

  • 2
    Removed tag gvim. Vim needs to connect to the X server to be able to interact with the system clipboard. Might be that Vim is somehow not able to connect to X. Are you able to start any X application from your terminal (like xterm or xclock)? Are you able to do that from inside Vim (like: :!xterm)? – Ralf Jul 6 '19 at 9:54
  • 2
    BTW: If echo v:windowid prints 0 (zero), Vim is not connected to X. – Ralf Jul 6 '19 at 13:19
  • @Ralf I connect to a Linux server using secureCRT, and run the command vimx in command-line mode. Command echo v:windowid in vimx prints 0. There is no command xterm or xclock on the remote server. Thanks, I will search 'X server' for help. – abgnwl Jul 9 '19 at 7:04

On GNOME terminal use shift + mouseleft + drag to select. Ctrl + Shift + C to copy. Ctrl + Shift + V to Paste.

| improve this answer | |
  • 2
    Well, that technically transfers the responsibility to Gnome... but the user may be using another DE, or maybe he wants to include "+yy in a function/macro/whatever. – Roflo Feb 7 at 20:02
  • "+yy is not working in debian or ubuntu's gnome terminal. That's why. – Bapi Feb 8 at 15:29

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.