Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Im using Vim 7.3 in Ubuntu and I'm having a little problem copying to the system clipboard with the following command "+y but I'm getting the following error: E354: Invalid register name: '+'

In my vim --version, I see -xterm_clipboard. The option to copy is from mouse right click is also grayed out.

What steps do I need to take to enable the copying of text from my vim to the system clipboard?

share|improve this question

migrated from programmers.stackexchange.com Dec 3 '11 at 3:40

This question came from our site for professional programmers interested in conceptual questions about software development.

up vote 10 down vote accepted

Trivial problem, sir.

sudo aptitude install vim-gnome

which already comes pre-compiled with the +xterm_clipboard option.

On source-based distros like gentoo, you will have to compile the package with this USE flag specified.

share|improve this answer

You should see +xterm_clipboard.

The simplest fix is to install a version of vim compiled with clipboard support. In Ubuntu, if you don't wish to build your own, you can install vim-gtk or vim-gnome, both of which have clipboard support.

share|improve this answer

For Arch Linux, install gvim. This also adds the missing feature to vim.

share|improve this answer

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.