Previous Section  < Day Day Up >  Next Section

Recipe 6.16. Discovering Vim's Compile-Time Options

6.16.1 Problem

You are having some troubles with Vim, and you think some features you need were not compiled in. How do you find out what options Vim was compiled with?

6.16.2 Solution

Open Vim and run:

:version

This shows all of Vim's compile-time options and initialization file locations on your system.

6.16.3 Discussion

Here is a simplified example of what :version output looks like. + means a feature is included; - means excluded. Now you can easily find out if you need to recompile Vim to enable a feature you want.

:version

VIM - Vi IMproved 6.2 (2003 Jun 1, compiled Apr  1 2004 23:39:33)

Included patches: 1-298, 300-426

Compiled by Norbert Tretkowski <nobse@debian.org>

Big version with GTK2 GUI.  Features included (+) or not (-):

+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver

 -hangul_input +iconv +insert_expand +jumplist

   

   system vimrc file: "$VIM/vimrc"

     user vimrc file: "$HOME/.vimrc"

      user exrc file: "$HOME/.exrc"

  system gvimrc file: "$VIM/gvimrc"

    user gvimrc file: "$HOME/.gvimrc"

    system menu file: "$VIMRUNTIME/menu.vim"

  fall-back for $VIM: "/usr/share/vim"

   

Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 

-I/usr/lib/gt k-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-     

-O2 -DFEAT_LANGMAP -DFEAT_KEYMAP -DF

EAT_SIGNS -DFEAT_RIGHTLEFT  -I/usr/X11R6/include

Linking: gcc  -L/usr/X11R6/lib  -L/usr/local/lib -o vim   -Wl,--export-dynamic 

-lgtk-x11-2.0 -lgdk-x

6.16.4 See Also

  • Vim online help (:help version) for a description of every available feature

    Previous Section  < Day Day Up >  Next Section