vi not showing color syntax highlighting in Ubuntu Linux

  • Post author:
  • Post published:October 27, 2022
  • Post last modified:May 21, 2023
  • Reading time:2 mins read

1.0 Error

The vi editor in Ubuntu Linux distribution is not showing color syntax highlighting in the edit window.

2.0 Solution

vi is one of the original text editors of the UNIX operating system offering full screen text editing with excellent cursor movement, navigation, search, edit, copy, cut and paste capabilities. The equivalent program under Linux is vim, which stands for “vi – improved”. One of the improvements offered by vim is color syntax highlighting, which helps in working with source code files. By default, a scaled down version of vim, vim.tiny, is made available in Ubuntu Linux distribution. The vi command is a symbolic link to the vim.tiny program.

You can improve the vi functionality by installing vim.

$ sudo apt-get update
$ sudo apt-get install vim

After this, vim.basic is installed and, now, vi command is a symbolic link to the vim.basic program, which provides color syntax highlighting.

3.0 See also

Karunesh Johri

Software developer, working with C and Linux.