Compile vim with clipboard and xterm
Solution 1
You can see if configure
manage to find a working X lib by checking the output of (or scroll through the output of configure
in your terminal):
$ grep X11 src/auto/config.h
#define HAVE_X11
If configure
failed then you'll see:
$ grep X11 src/auto/config.h
/* #undef HAVE_X11 */
You'll need to install the appropriate X development library like xlib
and xtst
for --with-x
to work.
On ubuntu it should be enough to install libx11-dev
and libxtst-dev
.
Solution 2
ubuntu18.04.4
sudo apt install libx11-dev libxtst-dev libxt-dev libsm-dev libxpm-dev
./configure --enable-python3interp=dynamic --prefix=$HOME/.local --enable-rubyinterp=dynamic --enable-gtk2-check --enable-gnome-check --with-features=huge --with-x
make install
./src/vim ---version | grep clip
Related videos on Youtube
bulleric
I am a open source administrator and os system developer
Updated on September 15, 2022Comments
-
bulleric over 1 year
I want to compile the current version of vim with:
+clipboard +xterm_clipboard and ruby support
But every time I compile it the
clipboard
and thexterm_clipboard
options aren't enabled.Is there a lib needed or must I add any other options in the configuration step?
./configure \ --enable-rubyinterp=dynamic \ --enable-cscope \ --enable-gui=auto \ --enable-gtk2-check \ --enable-gnome-check \ --with-features=huge \ --with-x make && sudo make install
-
fvdnabee about 11 yearsOnly installing those two libs on Ubuntu 12.04 didn't work for me. You can try installing the xorg-dev package under Ubuntu, although you do get a lot of additional and potentially unneeded packages this way.
-
Bentley4 almost 11 yearsRunning
sudo aptitude install vim-gnome
for 12.04 also fixes this. -
AC88 over 10 yearsExact X.Org packages seem to be:
libx11-dev libxtst-dev libxt-dev libsm-dev libxpm-dev
That gets all the HAVE_X11 defines except HAVE_X11_XMU_EDITRES_H, which doesn't seem to be enabled by X11/Xmu/Editres.h being added by libxmu-dev, probably only used in gvim. -
cledoux over 8 years@holygeek, please add all packages listed by Simon in your answer as they all appear necessary on Ubuntu. Took me forever to see Simon's comment and actually get the clipboard working. Thanks!
-
alhelal about 6 years@holygeek
grep: src/auto/config.h: No such file or directory
-
Zane Hitchcox almost 6 yearsThis didn't work for me until I completely deleted my vim directory and started over.
-
dza over 4 years@ZaneHitchcox same issue for me, it seems you can disable this "configure" cache behaviour by
./configure --cache-file=/dev/null
THIS however had absolutely no effect for me and I had to dorm src/auto/config.cache
.. This however is much easier by runningmake distclean
which removes this cache of configure, but it wasn't obvious coming back to this after a while. -
user3751385 almost 4 yearsYeah, that doesn't install python3