5

How can I paste something to the VIM from the clipboard?

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

  • 1
    vim in a terminal or a gtk-enabled graphical vim? – Stéphane Chazelas Feb 1 '14 at 10:31
  • terminal ("echo $TERM" gives me "xterm") – FrozenHeart Feb 1 '14 at 10:31
  • 1
    You probably didn't compile vim with X clipboard support. What does :version say? – Chris Down Feb 1 '14 at 10:33
  • Yep, there's the problem – FrozenHeart Feb 1 '14 at 10:35
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.

2

In a terminal

CTRL-Shift-v paste CTRL-Shift-c 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.

https://askubuntu.com/questions/237942/how-does-copy-paste-work-with-xterm

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.