Super User is a question and answer site for computer enthusiasts and power users. 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 read and tried several different solutions but I am still unable to copy from vim to system clipboard. Viceversa works, copying from outside vim and pasting with p is ok.

I have installed clipboard support, vim version is 7.3.429:

$ vim --version | grep clip
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+xsmp_interact +xterm_clipboard -xterm_save 

I have:

set clipboard=unnamedplus

in my .vimrc and clipboard is set when I do:

set clipboard?

(that returns clipboard=unnamedplus) or

:echo has('clipboard')

:echo has('unnamedplus') returns 1

To copy from gvim to clipboard I am using:

yy
y
"*y
"+y

To paste I use Ctrl+V, Ctrl+Shift+V (in a terminal), but it doesn't work.

My vimrc is here (sorry for pastebin, it is too long to stay in this post)

Edit: copying to different instance of vim works, via the p shortcut. Otherwise it does not work.

I am using Ubuntu 12.04 LTS, and GVim. Any idea?

Thanks

share|improve this question
1  
What does ":echo has('unnamedplus')" show? Also, are you sure you want 'clipboard' to be set to "unnamedplus" and not just "unnamed"? What are you doing to try to copy to the clipboard? – Heptite Oct 21 '13 at 20:57
    
I have updated my question – fbrundu Oct 22 '13 at 7:26
    
What about "+y? What do you use to paste in other programs? <C-v>? Middle-click? – romainl Oct 22 '13 at 7:54
    
It doesn't work.. I use Ctrl+V, Ctrl+Shift+V (in a terminal).. – fbrundu Oct 22 '13 at 8:07
1  
I have the same problem with my debian 7 server. I connect using SSH from my ubuntu desktop. On other (centos) servers vim copying works normally. – SPRBRN Oct 22 '13 at 8:08
up vote 0 down vote accepted

In my case, using Ubuntu 12.04, I found answer in this thread

Basically you have to install vim-gtk.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .