9

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?

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

This question came from our site for professionals, academics, and students working within the systems development life cycle.

13

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.

9

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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