Installing Vim 7.3 From Source

26 Nov 2012

Installing Vim from source allows you to enable/disable features that you want, which could make your Vim more user-friendly.

Here are some steps to do just that (a note to myself):

Step 1 download the source from vim’s website.

Step 2 is to unpack the compressed file.

Step 3 check the dependencies of Vim 7.3. For my case, I want Huge version with GTK2-GNOME GUI of Vim, which requires the build of GUI. In other words, that depends on a lot of libraries. After installing all the dependencies Vim needs, proceed to next step.

Step 4 go to the src directory in the upacked folder and type the following to build the Huge version:

$ make distclean
$ ./configure --with-features=huge --enable-gui=gnome2 --enable-cscope --enable-multibyte
$ make
$ sudo make install

Step 5 installation should be finished by now. Type “vim --version” at your command prompt to check what version you’ve got.

Here is the output of my “vim --version”:

VIM - Vi IMproved 7.3
Included patches: 1-729

Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm 
+mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang 
-mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript 
+printer +profile -python -python3 +quickfix +reltime +rightleft -ruby 
+scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop 
+syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
 +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual 
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup 
+X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save 
   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/local/share/vim"

For me, the most important feature is +xterm_clipboard, +clipboard, +multi_byte and +cscope. With +xterm_clipboard and +clipboard, I can easily copy and paste texts among Vim and other applications with only mouse!

Now sit back and relax and happy hacking with Vim!

P.S. Huge version is basically the version that includes everything!