12

I am using Vim on Arch Linux through urxvt. Since there is no "Ctrl-V" or "Ctrl-Shift-V" support in urxvt, there is no way for me to paste things I have copied from my browser (let's say) into my vim buffer.

I have set clipboard=unnamed in my .vimrc but this seems to have no effect. Pressing "p" only pastes from the vim clipboard and after copying or cutting from vim, nothing gets added to my system clipboard.

Just in urxvt, I can paste by using middle click on the mouse, which uses the system clipboard, but once I enter vim, even this functionality is replaced by vim's internal clipboard.

Is there any way to enable copy-paste functionality in my vim setup?

15

Ok. Apparently on native vim in Arch there is no support for X so the +clipboard feature is missing. To fix this, install gvim, which although conflicts with vim, which was my initial problem with it, retains the exact same functionality if you use

vim

Rather than,

gvim

You still need to set clipboard=unnamed.

  • 4
    I use Arch Linux, and has('clipboard') in vim works fine. You do need to install the gvim package to get a Vim linked to libX11; but you don't need to use gvim. – Martin Tournoij Apr 26 '15 at 8:24
  • 7
    In other words, uninstall vim, install gvim, run vim. Thanks though, this helped me getting system clipboard working – PhilT Aug 18 '16 at 12:41
  • Yes! installing gvim from xfce's pamac-manager worked for me on Manjaro 18.1.0 – Antoine Colson Oct 5 at 14:39

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