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
: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?"+y
? What do you use to paste in other programs?<C-v>
? Middle-click?Ctrl+V
,Ctrl+Shift+V
(in a terminal)..