I checked out latest vim7 from cvs repository.

cvs -z3 -d:pserver:anonymous@vim.cvs.sf.net:/cvsroot/vim checkout vim7

I tried:

./configure --enable-xterm_clipboard

but I got -

WARNING: unrecognized options --enable-xterm_clipboard

I tried:

./configure --with-x

but I got -

configure: error: unrecognized option: --with_x.

Can someone please tell me the correct way to configure with xterm_clipboard support?


I tried ./configure --with-feature=normal --with-x --with-gui in the src directory, but got WARNING: unrecognized options --with-feature, --with-gui at the end.


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

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

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

you should get your xterm-clipboard

  • works flawless on my server right now. – akira Jan 20 '11 at 6:43
  • Thanks, this is useful. However as I said, --with-x is giving error at top level, --with-feature, --with-gui are giving error if I run configure in src directory. – JP19 Jan 20 '11 at 6:43
  • are you doing configure at top level? – JP19 Jan 20 '11 at 6:44
  • yes. cvs yada yada; cd vim7; ./configure --with-x – akira Jan 20 '11 at 6:48
  • 1
    did you notice i fixed --with-features and --enable-gui (instead of --with-gui)? – akira Jan 20 '11 at 7:54

To easiest way to get vim working with xterm_clipboard is:

sudo apt-get install vim-gnome
  • 1
    is this just for Ubuntu? – Eric Brotto Jun 22 '12 at 11:36
  • 1
    This enables support for xterm_clipboard also for the console version of vim (on Ubuntu systems). – Tim Oct 17 '13 at 16:28

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

It looks like you aren't running configure in the src directory, but rather one level up. If you do chdir src; configure --with-x it should work okay.

But keep in mind two points:

  1. With Vim, the preferred way of modifying configure options is to modify src/Makefile
  2. The default is to enable the GUI, and thus +xterm_clipboard, and as far as I know you can't have +xterm_clipboard without the GUI being compiled in.
  • Yes, indeed I was running it at top level as usually thats recommended. I will try in src directory. (and also see the Makefile - I don't know changes there are preferred for vim). – JP19 Jan 20 '11 at 6:38
  • @Heptite: you can have clipboard without the gui, all you need is X. folks working mostly in xterm would be very unhappy otherwise :) – akira Jan 20 '11 at 6:50
  • @akira: I have edited my post to clarify my statement: I believe you must have a GUI compiled in to have the +xterm_clipboard feature available. – Heptite Jan 20 '11 at 20:05
  • 1
    your statement was clear, and i thought mine was clear as well: you do not need --enable-gui to have +xterm_clipboard: here, selfcompiled seconds ago: "VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jan 21 2011 08:17:30) ... Normal version without GUI. ... +xsmp_interact +xterm_clipboard -xterm_save". all thats needed to have +xterm_clipboad is './configure --with-x --with-features=normal' – akira Jan 21 '11 at 7:20
  • Ah, I stand (sit) corrected. It's been a long time since I've bothered to compile Vim without a GUI. – Heptite Jan 21 '11 at 10:04

I use this solution. I like to copy and paste over the clipboard with vim(very nice for copy between two remote vim session) Most distro don't compile vim with clipboard support(slackware for example) but compile gvim with clipboard support(slackware again). So simply use gvim,after edit .vimrc with this line(if you want like me to copy over vim)

set clipboard=unnamedplus

And for console without x or for people who don't like gui?

gvim -v

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy