Vim is a powerful text editor available on almost all modern computing platforms. It is bundled in the default installation of most Linux distributions, though Ubuntu and Debian ship with the minimal version of Vim. The version lack features such as syntax highlighting, making it less robust or valuable as it could be.

To get the full benefit of Vim, you need to install its more feature-rich version. Ubuntu and Debian do provide such version of Vim in its default apt repository. You can install the full version of Vim on Ubuntu via apt at the terminal.

Step-by-step video guide:

Steps to install full version of Vim on Ubuntu and Debian variance:

  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.2 (2019 Dec 12, compiled Sep 13 2022 09:35:02)
    Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
    Modified by team+vim@tracker.debian.org
    Compiled by team+vim@tracker.debian.org
    Small version without GUI.  Features included (+) or not (-):
    +acl               -file_in_path      -mouse_urxvt       -tcl
    -arabic            -find_in_path      +mouse_xterm       -termguicolors
    +autocmd           -float             +multi_byte        -terminal
    -autochdir         -folding           -multi_lang        +terminfo
    -autoservername    -footer            -mzscheme          +termresponse
    -balloon_eval      +fork()            -netbeans_intg     -textobjects
    -balloon_eval_term -gettext           +num64             -textprop
    -browse            -hangul_input      -packages          -timers
    +builtin_terms     +iconv             -path_extra        +title
    -byte_offset       +insert_expand     -perl              -toolbar
    -channel           -ipv6              -persistent_undo   +user_commands
    -cindent           -job               -popupwin          -vartabs
    -clientserver      +jumplist          -printer           +vertsplit
    -clipboard         -keymap            -profile           +vim9script
    +cmdline_compl     -lambda            -python            -viminfo
    +cmdline_hist      -langmap           -python3           +virtualedit
    -cmdline_info      -libcall           -quickfix          +visual
    +comments          -linebreak         -reltime           +visualextra
    -conceal           -lispindent        -rightleft         +vreplace
    -cryptv            +listcmds          -ruby              +wildignore
    -cscope            +localmap          +scrollbind        -wildmenu
    +cursorbind        -lua               -signs             +windows
    -cursorshape       -menu              -smartindent       +writebackup
    -dialog            -mksession         -sodium            -X11
    -diff              +modify_fname      -sound             +xfontset
    -digraphs          +mouse             -spell             -xim
    -dnd               -mouseshape        -startuptime       -xpm
    -ebcdic            -mouse_dec         -statusline        -xsmp
    -emacs_tags        -mouse_gpm         -sun_workshop      -xterm_clipboard
    -eval              -mouse_jsbterm     -syntax            -xterm_save
    +ex_extra          -mouse_netterm     +tag_binary        
    -extra_search      +mouse_sgr         -tag_old_static    
    -farsi             -mouse_sysmouse    -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 -ffile-prefix-map=/build/vim-NNb5ax/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
    Linking: gcc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lacl -lattr
  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... Done
    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.
    After this operation, 1,764 kB disk space will be freed.
    (Reading database ... 168092 files and directories currently installed.)
    Removing ubuntu-minimal (1.481) ...
    Removing vim-tiny (2:8.2.3995-1ubuntu2.1) ...
  4. Update apt's package list.
    $ sudo apt update
    Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
    Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-proposed InRelease
    Hit:3 http://us.ports.ubuntu.com/ubuntu-ports jammy InRelease
    Hit:4 http://us.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
    Hit:5 http://us.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
    Reading package lists... Done
    Building dependency tree... Done
    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... Done
    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 8,492 kB of archives.
    After this operation, 37.4 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.2 (2019 Dec 12, compiled Sep 13 2022 09:35:02)
    Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
    Modified by team+vim@tracker.debian.org
    Compiled by team+vim@tracker.debian.org
    Huge version without GUI.  Features included (+) or not (-):
    +acl               +file_in_path      +mouse_urxvt       -tag_any_white
    +arabic            +find_in_path      +mouse_xterm       -tcl
    +autocmd           +float             +multi_byte        +termguicolors
    +autochdir         +folding           +multi_lang        +terminal
    -autoservername    -footer            -mzscheme          +terminfo
    -balloon_eval      +fork()            +netbeans_intg     +termresponse
    +balloon_eval_term +gettext           +num64             +textobjects
    -browse            -hangul_input      +packages          +textprop
    ++builtin_terms    +iconv             +path_extra        +timers
    +byte_offset       +insert_expand     -perl              +title
    +channel           +ipv6              +persistent_undo   -toolbar
    +cindent           +job               +popupwin          +user_commands
    -clientserver      +jumplist          +postscript        +vartabs
    -clipboard         +keymap            +printer           +vertsplit
    +cmdline_compl     +lambda            +profile           +vim9script
    +cmdline_hist      +langmap           -python            +viminfo
    +cmdline_info      +libcall           +python3           +virtualedit
    +comments          +linebreak         +quickfix          +visual
    +conceal           +lispindent        +reltime           +visualextra
    +cryptv            +listcmds          +rightleft         +vreplace
    +cscope            +localmap          -ruby              +wildignore
    +cursorbind        -lua               +scrollbind        +wildmenu
    +cursorshape       +menu              +signs             +windows
    +dialog_con        +mksession         +smartindent       +writebackup
    +diff              +modify_fname      +sodium            -X11
    +digraphs          +mouse             -sound             -xfontset
    -dnd               -mouseshape        +spell             -xim
    -ebcdic            +mouse_dec         +startuptime       -xpm
    +emacs_tags        +mouse_gpm         +statusline        -xsmp
    +eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
    +ex_extra          +mouse_netterm     +syntax            -xterm_save
    +extra_search      +mouse_sgr         +tag_binary        
    -farsi             -mouse_sysmouse    -tag_old_static    
       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 -ffile-prefix-map=/build/vim-NNb5ax/vim-8.2.3995=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
    Linking: gcc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -L/usr/lib/python3.10/config-3.10-aarch64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm
Discuss the article:

Comment anonymously. Login not required.