Compiling vim with xterm_clipboard support

by looking at src/feature.h you can see that:

#ifdef FEAT_GUI
# ifndef FEAT_CLIPBOARD
#  define FEAT_CLIPBOARD
#  ifndef FEAT_VISUAL
#   define FEAT_VISUAL
#  endif
# endif
#endif

#if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \
    && (defined(UNIX) || defined(VMS)) \
    && defined(WANT_X11) && defined(HAVE_X11)
# define FEAT_XCLIPBOARD
# ifndef FEAT_CLIPBOARD
#  define FEAT_CLIPBOARD
# endif
#endif
  • having --with-features=normal
  • having --enable-gui
  • having --with-x

you should get your xterm-clipboard


To easiest way to get vim working with xterm_clipboard is:

sudo apt-get install vim-gnome

On Ubuntu, the flags above worked for me, but I also had to install the xorg-dev package

sudo apt-get install xorg-dev

./configure --with-x --enable-gui=auto  --with-features=huge