0

I am using vim in a terminal emulator on Ubuntu 14.04.

I have been using it for a while and had been getting along fine, until I had to copy lines from one file to another. After some searching I found what I needed, which was to do:

 set clipboard=unnamed

However, This wasn't working and neither was explicitly using the * register.
Turns out, I don't have clipboard support. Here is the output of vim --version Vim --version outpu

Note the entries:

-clipboard
-x11
-xterm_clipboard

So how can I get clipboard support? Is it necessary to install a completely new version of Vim?

For now, I am using :read and sed combined to get the line numbers that I want, but I would like a cleaner solution.

2
  • Was the file you wanted to paste to inside or outside vim?
    – Aster
    Aug 30, 2014 at 22:05
  • Inside, but I'd like to be able to do both
    – Luke
    Aug 30, 2014 at 22:45

1 Answer 1

2

Clipboard support is only one command away:

$ sudo apt-get install vim-gnome

But you could simply edit all your files in Vim and yank/put between buffers.

2
  • Will this overwrite my .vimrc?
    – Luke
    Aug 30, 2014 at 22:45
  • No, of course not. As long it's really your .vimrc, in your $HOME.
    – romainl
    Aug 30, 2014 at 22:53

You must log in to answer this question.

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