I have a Debian 7.0 with gnome, and I am fully satisfied with the standard vim version installed on it, except for the lack of +clipboard and/or +xterm_clipboard.

I got the sources using mercurial, but I cannot find a way to enable just those.

I have read this answer or that question. But I don't want to install a full GUI version. It seems overkill to me that I should add all those options just to enable one feature.

Is there a nice way to do it, or should I dive into the code (probably starting from feature.h), to hopefully get what I want..?

  • 1
    I'm fairly sure you don't need to recompile Vim to enable +clipboard on Debian. I don't have a Debian system available, but when I wrote this people pointed out that installing the vim-gtk or vim-gnome package should do the trick. The only extra dependency you have for vim-gtk will be gtk2 (which you probably already have on most systems anyway). IMHO, the ability to upgrade easily is a lot less effort than installing a few extra dependencies. Commented May 20, 2015 at 13:56
  • Yes I could get it, but aptitude show vim-gnome shows This package contains a version of vim compiled with a GNOME2 GUI and support for scripting with Lua, Perl, Python, Ruby, and Tcl. and GTK, you need to replace GNOME with GTK. So it adds many more feature than the only one I need: +lua, +perl, and gnome/GTK things. Which on a whole would make vim much heavier. Commented May 20, 2015 at 13:57
  • 3
    I did some very basic speed tests of Vim compiled with --tiny (almost no features) and --huge (all features), and didn't really notice a significant increase in memory or system usage. The tests very very basic, but unless you're noticing performance problems I wouldn't worry about it. Commented May 20, 2015 at 14:03
  • Just install vim-gnome or vim-gtk, you won't notice a difference. Except for the presence of clipboard support, that is. Clipboard support depends on GUI anyway so you don't really have a choice, here. Also, did you try xclip?
    – romainl
    Commented May 20, 2015 at 16:09
  • On the page I have read about xclip and xsel. But I wanted to see if I had an alternative to 1) install options I am not interested in or 2) install a third party program. Reading both of your comments, it looks like I'm out of luck. Commented May 20, 2015 at 19:59

1 Answer 1


vim doesn't need gnome or gtk to get +clipboard, but it does need x11. From my tests, the minimum amount of dependencies needed are the xorg header files and x11 dbus support. In Debian

apt-get install x11-dev dbus-x11

will do the job. Then you can

./configure --with-features=huge

and vioala, +clipboard

  • This is not exactly what I was hoping, but it is probably as good as it gets. Indeed from features=normal to features=huge, a few options more options are added. Thanks anyway. Commented Jun 2, 2015 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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