5

How can I paste something into Vim from the clipboard?

In Windows, "*p works as expected but in Debian, both "*p and "+p don't work with both clipboard=unnamed and clipboard=unnamedplus.

ggorlen
  • 105

2 Answers2

6

In Debian, if you want X clipboard support, install the vim-gtk (or vim-gnome for Gnome specific extras) package instead of the standard vim package. vim will run normally in the terminal, it is only when it is invoked as gvim that the GUI is started.

Graeme
  • 34,027
3

In a terminal

CtrlShiftV (paste)
CtrlShiftC (copy)

In an xterm I get into insert mode, highlight what I want to copy, then use the middle button, (to trigger paste), ensuring I click where I want highlighted pasted.

How does copy-paste work with xterm? - Ask Ubuntu

Stephen Kitt
  • 434,908
X Tian
  • 10,463