Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

As said in the title I am 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 it is set when I do:

set clipboard?


:echo has('clipboard')

I am using Ubuntu 12.04 LTS, and vim inside gnome-terminal (but also GVim has the same problem). Any idea?


share|improve this question… This may help you out a bit. – coteyr Sep 19 '13 at 14:55
Did you quit vim between typing "+y on visual selection and trying to paste outside vim ? It won't work if you do – Samuel Peter Sep 23 '13 at 2:48
@SamuelPeter No, I didn't quit vim – fbrundu Sep 23 '13 at 9:07
up vote 37 down vote accepted

This is what works for me (Ubuntu 13.10):

Reinstall vim as vim-gtk:

sudo apt-get install vim-gtk

select what you want using the mouse - then type to copy to clipboard:


to paste to vim from clipboard type:


I don't know why but comparing the output of vim --version shows that the usual vim installation is quite restricted compared to vim-gtk. Replacing vim with vim-gtk did not affect any plugings.

Further information:

share|improve this answer
I cannot express how much you helped me and how much I am happy now :D – 7hi4g0 Mar 23 '14 at 21:09
You're welcome! – Raffael Mar 23 '14 at 21:20
Interestingly, on 14.04 both regular VIM and VIM-GTK have xterm_clipboard support, but "+p does not work in regular VIM. Rather than clipping to the clipboard, it increases the amont of selected lines. – dotancohen Dec 1 '14 at 10:36
Ditto. Thank you very much! – Alexis Bellido May 21 '15 at 14:26
Installing vim-gtk ultimately worked for me in 14.04.4, but I experienced things a bit differently than others commenting. Prior to having vim-gtk installed, vim was showing -xterm_clipboard (i.e. not enabled). After installing vim-gtk it shows (+xterm_clipboard). I am checking this with vim --version | grep clip. Anyway, makes sense that you need +xterm_clipboard! – overthink Jun 12 at 16:19

I am going to leave the original answer below because it may be important for others that search for this question.

In short there doesn't seem to be a one size fits all answer, but with 'set clipboard=unnamedplus' one of either '*p' or '+p' should work from the "system" clipboard.

'*p' is almost certainly the one you want. (from here)

vim is a cli program. When using it inside gnome-terminal (or any terminal emulator) crtl+c (or any key combination) is handled by the terminal emulator first, then the shell, then finally by the program (vim in this case). vim and ctrl+c will almost certainly never work because ctrl+c sends an SIGINT signal to the running task. vim uses SIGINT to stop other things like aborting insert mode, or stopping search functions.

In other words. Ctrl+C is never actually passed to VIM. SIGINT is passed to VIM. SIGINT has other uses in vim so using to copy is likely not going to work (and even if can you force it, not a good idea).

Instead try sticking with Ctrl+Shift+C and Ctrl+Shift+V (there are others but I believe those put text in the system clipboard)

To be fair I don't know much about gvim.

share|improve this answer
Maybe I confused you.. I said using ctrl-c OUTSIDE vim and the pasting with p, but in vim I know I have to use y.. I'll edit my question – fbrundu Sep 19 '13 at 14:49
LOL haven't had my caffeine yet, sorry. – coteyr Sep 19 '13 at 14:52

Your Answer


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.