Install full version of Vim on Ubuntu

Vim is a very powerful text editor and is available in almost all modern computing platforms. It is bundled in the default installation of almost Linux distribution, though Ubuntu ships with the minimal version of Vim which lack features such as syntax highlighting making it less powerful or useful as it could be.

Details about the currently installed version could be gathered by running vi --version from the command line .The full version of Vim is available in the default package repository and can easily be installed by following these steps at the terminal:

  1. View list of enabled and disabled features of currently installed Vim.
    $ vi --version
    VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43)
    Included patches: 1-197, 322, 377-378, 422, 550
    Modified by pkg-vim-maintainers@lists.alioth.debian.org
    Compiled by pkg-vim-maintainers@lists.alioth.debian.org
    Small version without GUI.  Features included (+) or not (-):
    +acl             -farsi           -mouse_netterm   +tag_binary
    -arabic          -file_in_path    -mouse_sgr       -tag_old_static
    -autocmd         -find_in_path    -mouse_sysmouse  -tag_any_white
    -balloon_eval    -float           -mouse_urxvt     -tcl
    -browse          -folding         -mouse_xterm     -termguicolors
    +builtin_terms   -footer          +multi_byte      +terminfo
    -byte_offset     +fork()          -multi_lang      -termresponse
    -channel         -gettext         -mzscheme        -textobjects
    -cindent         -hangul_input    -netbeans_intg   -timers
    -clientserver    +iconv           -num64           -title
    -clipboard       -insert_expand   +packages        -toolbar
    -cmdline_compl   -job             -path_extra      -user_commands
    +cmdline_hist    +jumplist        -perl            +vertsplit
    -cmdline_info    -keymap          -persistent_undo -virtualedit
    -comments        -lambda          -printer         +visual
    -conceal         -langmap         -profile         -visualextra
    -cryptv          -libcall         -python          -viminfo
    -cscope          -linebreak       -python3         -vreplace
    -cursorbind      -lispindent      -quickfix        +wildignore
    -cursorshape     -listcmds        -reltime         -wildmenu
    -dialog          -localmap        -rightleft       +windows
    -diff            -lua             -ruby            +writebackup
    -digraphs        -menu            -scrollbind      -X11
    -dnd             -mksession       -signs           +xfontset
    -ebcdic          -modify_fname    -smartindent     -xim
    -emacs_tags      -mouse           -startuptime     -xpm
    -eval            -mouse_dec       -statusline      -xsmp
    +ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
    -extra_search    -mouse_jsbterm   -syntax          -xterm_save
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
          user exrc file: "$HOME/.exrc"
           defaults file: "$VIMRUNTIME/defaults.vim"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux -lacl -lattr -ldl
  2. Remove vim-tiny which is the default installation package.
    $ sudo apt remove -y vim-tiny
  3. Update package list.
    $ sudo apt update
  4. Install the full version of Vim.
    $ sudo apt install -y vim
  5. Verify package is successfully installed and view the list of enabled features.
    $ vi --version
    VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43)
    Included patches: 1-197, 322, 377-378, 422, 550
    Modified by pkg-vim-maintainers@lists.alioth.debian.org
    Compiled by pkg-vim-maintainers@lists.alioth.debian.org
    Huge version without GUI.  Features included (+) or not (-):
    +acl             +file_in_path    +mouse_sgr       +tag_old_static
    +arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
    +autocmd         +float           +mouse_urxvt     -tcl
    -balloon_eval    +folding         +mouse_xterm     +termguicolors
    -browse          -footer          +multi_byte      +terminfo
    ++builtin_terms  +fork()          +multi_lang      +termresponse
    +byte_offset     +gettext         -mzscheme        +textobjects
    +channel         -hangul_input    +netbeans_intg   +timers
    +cindent         +iconv           +num64           +title
    -clientserver    +insert_expand   +packages        -toolbar
    -clipboard       +job             +path_extra      +user_commands
    +cmdline_compl   +jumplist        -perl            +vertsplit
    +cmdline_hist    +keymap          +persistent_undo +virtualedit
    +cmdline_info    +lambda          +postscript      +visual
    +comments        +langmap         +printer         +visualextra
    +conceal         +libcall         +profile         +viminfo
    +cryptv          +linebreak       -python          +vreplace
    +cscope          +lispindent      +python3         +wildignore
    +cursorbind      +listcmds        +quickfix        +wildmenu
    +cursorshape     +localmap        +reltime         +windows
    +dialog_con      -lua             +rightleft       +writebackup
    +diff            +menu            -ruby            -X11
    +digraphs        +mksession       +scrollbind      -xfontset
    -dnd             +modify_fname    +signs           -xim
    -ebcdic          +mouse           +smartindent     -xpm
    +emacs_tags      -mouseshape      +startuptime     -xsmp
    +eval            +mouse_dec       +statusline      -xterm_clipboard
    +ex_extra        +mouse_gpm       -sun_workshop    -xterm_save
    +extra_search    -mouse_jsbterm   +syntax
    +farsi           +mouse_netterm   +tag_binary
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
          user exrc file: "$HOME/.exrc"
           defaults file: "$VIMRUNTIME/defaults.vim"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm

    Note the difference of enabled and disabled features.

Sign up for Ubuntu Linux Fundamentals - Learn Linux Server with Ubuntu course on Udemy to learn more.


Written by Mohd Shakir Zakaria. Last updated on 2019-03-21