12

I'd like to install VIM via apt-get, but I'm not sure if I get all of its features.

Is there a difference between this, and compiling it from source?

3 Answers 3

15

If you look at the options used to build the various packages (in debian/rules), you'll see

OPTFLAGS+=--with-features=huge

...

NOINTERPFLAGS:=--disable-luainterp
NOINTERPFLAGS+=--disable-mzschemeinterp
NOINTERPFLAGS+=--disable-perlinterp
ifeq ($(DEB_VENDOR),Ubuntu)
    NOINTERPFLAGS+=--enable-pythoninterp --with-python-config-dir=$(shell python-config --configdir)
else
    NOINTERPFLAGS+=--disable-pythoninterp
endif
NOINTERPFLAGS+=--disable-python3interp
NOINTERPFLAGS+=--disable-rubyinterp
NOINTERPFLAGS+=--disable-tclinterp

ALLINTERPFLAGS:=--enable-luainterp
ALLINTERPFLAGS+=--disable-mzschemeinterp
ALLINTERPFLAGS+=--enable-perlinterp
ALLINTERPFLAGS+=--enable-pythoninterp --with-python-config-dir=$(shell python-config --configdir)
ALLINTERPFLAGS+=--disable-python3interp
ALLINTERPFLAGS+=--enable-rubyinterp
ALLINTERPFLAGS+=--enable-tclinterp
ALLINTERPFLAGS+=--with-tclsh=/usr/bin/tclsh

...

CFLAGS_vim-basic:=$(CFLAGS)
CFGFLAGS_vim-basic:=$(CFGFLAGS) $(OPTFLAGS) $(NOXFLAGS) $(NOINTERPFLAGS)

CFLAGS_vim-tiny:=$(CFLAGS) -DTINY_VIMRC
CFGFLAGS_vim-tiny:=$(CFGFLAGS) $(TINYFLAGS)

CFLAGS_vim-gtk:=$(CFLAGS)
CFGFLAGS_vim-gtk:=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GTKFLAGS) $(ALLINTERPFLAGS)

CFLAGS_vim-gnome:=$(CFLAGS)
CFGFLAGS_vim-gnome:=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GNOMEFLAGS) $(ALLINTERPFLAGS)

CFLAGS_vim-athena:=$(CFLAGS)
CFGFLAGS_vim-athena:=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(ATHENAFLAGS) $(ALLINTERPFLAGS)

CFLAGS_vim-nox:=$(CFLAGS)
CFGFLAGS_vim-nox:=$(CFGFLAGS) $(OPTFLAGS) $(NOXFLAGS) $(ALLINTERPFLAGS)

So:

  • all packages except vim-tiny gets built with --with-features=huge
  • vim-basic (aka vim) has interpreters turned off
  • the others have options based on frontend, with interpreters turned on.

To pick one:

  • If you'd like a barebones Vim, pick vim-tiny.
  • If you'd like a more full-featured Vim, pick vim.
  • If you'd like all the features that the packaging allows, but don't want GUI (and the dependencies of a GUI), pick vim-nox.
  • If you'd like a GUI, and but don't want anything to do with GTK, pick vim-athena.
  • If you'd like a GUI, and use a GNOME-based desktop environment (GNOME, Unity, Cinnamon, etc.), pick vim-gnome and use a GTK3-based environment (GNOME, Unity, Cinnamon, MATE, etc.), pick vim-gtk3.
  • If you'd like a GUI, and use a GTK2-based or non-GTK desktop environment (XFCE, LXDE, etc.), pick vim-gtk.
8
  • I would like to accept this as the answer, but, when I asked the question, I was unregistered. Commented Sep 27, 2015 at 17:05
  • @AmagicalFishy if you registered with another email, you can merge the accounts.
    – muru
    Commented Sep 27, 2015 at 17:08
  • I registered with the same e-mail, actually. I even got a notification that this answer was posted—but there's no accept-answer checkmark, for some reason. Commented Sep 27, 2015 at 17:22
  • @AmagicalFishy at first glance, it seems there's nothing I can do as mod, sorry. You'll need to contact the Stack Exchange team, as given in vi.stackexchange.com/help/merging-accounts.
    – muru
    Commented Sep 27, 2015 at 17:28
  • 1
    Although :help gui-gnome is pretty obsolete. On modern Gnome, there's not much that vim-gnome provides (c.f., Debian bug #820239) which is why I removed it.
    – jamessan
    Commented May 29, 2018 at 20:15
6

Indeed the version you get with apt-get install vim doesn't have all the features of a version compiled with --with-features=huge. For example you don't always have options like +python or +lua.

A good alternative is to use apt-get install vim-nox which is much more complete.

5

$ sudo apt-get install vim-gtk (or vim-gnome if you are on Ubuntu) will get you the most complete Vim with the least effort.

Official packages usually lag a bit so, if you really want the latest version, you will have to apply the latest patches and build it yourself.

Be aware, though, that new patches come up every couple of days, so keeping up with upstream needs dedication.

2
  • 1
    pi-rho's PPA generally has very up-to-date packages.
    – muru
    Commented Sep 27, 2015 at 8:24
  • @muru, agreed and recommended. That's the one I used when I was using Ubuntu.
    – romainl
    Commented Sep 27, 2015 at 8:27

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.