1

TL;DR

When I copy some text from an external application, and then in vim I do "+p, it tells me E353: Nothing in register " instead of copying this text.

More details

I used to work with vim on an Ubuntu-13.10, and it worked fine. I recently changed of computer, and installed Ubuntu-14.10

Now, I can't use vim + register, neither to copy, nor to paste from an other application.

What can explain this behavior, and how can I fix it?

Some more practical details

  • I use Gnome terminal
  • I can still pass in insert mode and press Shift + Insert to paste something copied from another application
  • When I ssh, from this computer, to another one with an Ubuntu-14.04 server, I don't have any issue with this register
gturri
  • 13,807
  • 9
  • 40
  • 57
  • Are you sure you installed vim which has X support? You can check by `vim --version | grep xterm_clipboard` and `vim --version | grep X11` – Evan Sebastian Jul 14 '14 at 08:42
  • Possible duplicate http://stackoverflow.com/questions/10101488/cut-to-the-system-clipboard-from-vim-on-ubuntu – Evan Sebastian Jul 14 '14 at 08:44
  • `$ sudo apt-get install vim-gnome` will likely solve your problem. – romainl Jul 14 '14 at 08:49
  • installing `vim-gnome` solved my issue! Thanks for all your suggestions. @romainl: feel free to turn your comment into an answer so that I can accept it – gturri Jul 14 '14 at 08:59

1 Answers1

3

As is the case on every UNIX-derived system, Ubuntu's default Vim is a lightweight version (vim-tiny IIRC) that is not built with clipboard support.

Installing the vim-gnome package gives you clipboard support as well as other useful features:

$ sudo apt-get install vim-gnome
romainl
  • 186,200
  • 21
  • 280
  • 313
  • What is the CentOS equivalent of vim-gnome? I'm working on a remote server, which doesn't have the xterm_clipboard feature for the vim installed – Ambareesh Aug 12 '20 at 17:31
  • 1
    1. You are not looking for the `xterm_clipboard` feature, but for the `clipboard` feature. 2. The equivalent of `vim-gnome` on CentOS is `vim-X11`. – romainl Aug 13 '20 at 06:32