Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 –  nsl 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).. –  nsl 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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.