Share!

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.

Even so, Ubuntu still provides the more feature-rich version on Vim in its default apt repository.

You can install full version of Vim on Ubuntu via apt at the terminal.

Tutorial video:

Install full version of Vim on Ubuntu

  1. Open terminal from the application launcher or via the <ctrl> + <alt> + <t> keyboard shortcut.
  2. View list of enabled and disabled features of currently installed Vim.
    $ vi --version
    VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 03 2018 00:15:14)
    Included patches: 1-320
    Modified by team+vim@tracker.debian.org
    Compiled by team+vim@tracker.debian.org
    Small version without GUI.  Features included (+) or not (-):
    +acl               -extra_search      -mouse_sgr         -tcl
    -arabic            -farsi             -mouse_sysmouse    -termguicolors
    +autocmd           -file_in_path      -mouse_urxvt       -terminal
    -autochdir         -find_in_path      -mouse_xterm       +terminfo
    -autoservername    -float             +multi_byte        -termresponse
    -balloon_eval      -folding           -multi_lang        -textobjects
    -balloon_eval_term -footer            -mzscheme          -timers
    -browse            +fork()            -netbeans_intg     -title
    +builtin_terms     -gettext           -num64             -toolbar
    -byte_offset       -hangul_input      -packages          -user_commands
    -channel           +iconv             -path_extra        -vartabs
    -cindent           -insert_expand     -perl              +vertsplit
    -clientserver      -job               -persistent_undo   -virtualedit
    -clipboard         +jumplist          -printer           +visual
    -cmdline_compl     -keymap            -profile           -visualextra
    +cmdline_hist      -lambda            -python            -viminfo
    -cmdline_info      -langmap           -python3           +vreplace
    -comments          -libcall           -quickfix          +wildignore
    -conceal           -linebreak         -reltime           -wildmenu
    -cryptv            -lispindent        -rightleft         +windows
    -cscope            +listcmds          -ruby              +writebackup
    +cursorbind        -localmap          +scrollbind        -X11
    -cursorshape       -lua               -signs             +xfontset
    -dialog            -menu              -smartindent       -xim
    -diff              -mksession         -startuptime       -xpm
    -digraphs          -modify_fname      -statusline        -xsmp
    -dnd               -mouse             -sun_workshop      -xterm_clipboard
    -ebcdic            -mouse_dec         -syntax            -xterm_save
    -emacs_tags        -mouse_gpm         +tag_binary
    -eval              -mouse_jsbterm     -tag_old_static
    +ex_extra          -mouse_netterm     -tag_any_white
       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-GAHaXS/vim-8.1.0320=. -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
  3. Remove vim-tiny which is the default installation package.
    $ sudo apt remove --assume-yes vim-tiny
    [sudo] password for user:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      vim-common xxd
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      ubuntu-minimal vim-tiny
    0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
    ##### snipped
  4. Update apt's package list.
    $ sudo apt update
    Get:1 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
    Hit:2 http://my.archive.ubuntu.com/ubuntu disco InRelease
    Hit:3 http://my.archive.ubuntu.com/ubuntu disco-updates InRelease
    Hit:4 http://my.archive.ubuntu.com/ubuntu disco-backports InRelease
    Fetched 97.5 kB in 1s (65.5 kB/s)
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    All packages are up to date.
  5. Install the full version of Vim.
    $ sudo apt install --assume-yes vim
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following additional packages will be installed:
      vim-runtime
    Suggested packages:
      ctags vim-doc vim-scripts
    The following NEW packages will be installed:
      vim vim-runtime
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6,789 kB of archives.
    After this operation, 33.0 MB of additional disk space will be used.
    ##### snipped
  6. Verify package is successfully installed and view the list of enabled features.
    $ vi --version
    VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 03 2018 00:15:14)
    Included patches: 1-320
    Modified by team+vim@tracker.debian.org
    Compiled by team+vim@tracker.debian.org
    Huge version without GUI.  Features included (+) or not (-):
    +acl               +extra_search      +mouse_netterm     +tag_old_static
    +arabic            +farsi             +mouse_sgr         -tag_any_white
    +autocmd           +file_in_path      -mouse_sysmouse    -tcl
    +autochdir         +find_in_path      +mouse_urxvt       +termguicolors
    -autoservername    +float             +mouse_xterm       +terminal
    -balloon_eval      +folding           +multi_byte        +terminfo
    +balloon_eval_term -footer            +multi_lang        +termresponse
    -browse            +fork()            -mzscheme          +textobjects
    ++builtin_terms    +gettext           +netbeans_intg     +timers
    +byte_offset       -hangul_input      +num64             +title
    +channel           +iconv             +packages          -toolbar
    +cindent           +insert_expand     +path_extra        +user_commands
    -clientserver      +job               -perl              +vartabs
    -clipboard         +jumplist          +persistent_undo   +vertsplit
    +cmdline_compl     +keymap            +postscript        +virtualedit
    +cmdline_hist      +lambda            +printer           +visual
    +cmdline_info      +langmap           +profile           +visualextra
    +comments          +libcall           -python            +viminfo
    +conceal           +linebreak         +python3           +vreplace
    +cryptv            +lispindent        +quickfix          +wildignore
    +cscope            +listcmds          +reltime           +wildmenu
    +cursorbind        +localmap          +rightleft         +windows
    +cursorshape       -lua               -ruby              +writebackup
    +dialog_con        +menu              +scrollbind        -X11
    +diff              +mksession         +signs             -xfontset
    +digraphs          +modify_fname      +smartindent       -xim
    -dnd               +mouse             +startuptime       -xpm
    -ebcdic            -mouseshape        +statusline        -xsmp
    +emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
    +eval              +mouse_gpm         +syntax            -xterm_save
    +ex_extra          -mouse_jsbterm     +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-GAHaXS/vim-8.1.0320=. -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.7/config-3.7m-x86_64-linux-gnu -lpython3.7m -lpthread -ldl -lutil -lm

Guide compatibility:

Operating System
Ubuntu 16.04 LTS (Xenial Xerus)
Ubuntu 16.10 (Yakkety Yak)
Ubuntu 17.04 (Zesty Zapus)
Ubuntu 17.10 (Artful Aardvark)
Ubuntu 18.04 LTS (Bionic Beaver)
Ubuntu 18.10 (Cosmic Cuttlefish)
Ubuntu 19.04 (Disco Dingo)