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've tried to copy text from Vim window to somewhere but it doesn't work. Decisions which I've found with google didn't help too. For instance, using the registers "* and "+.

Command vim version is (Ubuntu 12.04. Vim 7.3):

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

Can you help me to solve it? Should I use other vim version or are there any methods to copy text from Vim to something else?

share|improve this question

migrated from Dec 5 '12 at 10:19

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

You might be using vim-tiny.


$ vim --version | grep version

and report back the result.

If you are using "tiny", you should install a proper version.


$ sudo apt-get install vim-nox


$ sudo apt-get install vim-gnome
share|improve this answer
I've installed vim-gnome and now Vim supports clipboard. "* and other methods is available. Thank you for the response! – edem Dec 3 '12 at 17:50

Better if you just install fuller version of vim with all necessary stuff compiled in. But if you can’t do this for some reason then you have at least two options: open file in something else (like gedit) and copy from there or use xclip or xsel to put required text to the clipboard. Example usage:

:'<,'>w !xclip -i

to send a visually selected range of lines to clipboard (by default: primary/mouse buffer referred as * in vim, use -sel clip additional arguments to change this to clipboard one referred as +) and

:call system('xclip -i', @")

to send a default (") register contents to clipboard.

share|improve this answer

You must log in to answer this question.

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