I have

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)

which was installed with apt

It doesn't support the clipboard option. So I cannot copy some buffer contents to the system clipboard by typing "+yy for example.

I'm curious whether it's possible to switch my VIM to another repository that contains VIM with working clipboard option and update it. If yes, then how to do it? What repository, how to switch etc. ?

1 Answer 1


I believe the reason for this is that clipboard requires Vim to be compiled/linked against X11 libraries. (The clipboard is a GUI feature.) If this were the default configuration then Vim wouldn't be available on systems that don't also have X dependencies installed. That's a pretty big restriction given how many users don't need/want anything GUI-related (those that deploy server-only instances, for example).

I'm going based off memory of a post I saw on the Vim stack exchange site but I believe your options would be to install a different Vim package or to build Vim yourself...in both cases only IF you already have X or are willing to install it, too.

I will dig up that post and link it here soon as I find it.

Here we go: Why is Vim for Debian compiled without clipboard? Though it's explicitly about Debian certainly the general points apply and, given my understanding of the Debian-Unbuntu lineage, the details may be applicable, too.

  • Many thanks! $ sudo apt-get install vim-gtk solved the problem
    – ka3ak
    Commented May 5, 2018 at 18:37
  • @ka3ak Oh, great. Glad it was that easy for you.
    – B Layer
    Commented May 5, 2018 at 18:38

You must log in to answer this question.

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