Setting Colors in vim

Last Updated on 03/19/2013 by dboth

On a color terminal or in a GUI, the vim editor displays text files in color.

vi uses color coding to highlight various aspects of different types of text files, such as various programming languages. This color highlighting makes it easy to spot things like program commands, comments, variables, string literals, and other syntactical elements.

Depending upon the color scheme of your terminal, some elements of the vim scheme may not be readable.

The vim editor has a number of preset color schemes that you can choose from to make the vim screen more readable to you.

The available preset color schemes – subject to change, of course – are:

  • blue.vim
  • default.vim
  • desert.vim
  • evening.vim
  • morning.vim
  • pablo.vim
  • shine.vim
  • torte.vim
  • darkblue.vim
  • delek.vim
  • elflord.vim
  • koehler.vim
  • murphy.vim
  • peachpuff.vim
  • ron.vim
  • slate.vim
  • zellner.vim

To change the color scheme to blue, for example, use the vim command:

: colorscheme blue

The vim color schemes are located in the /usr/share/vim/vim73/colors directory along with a README.txt file that describes how to create new color schemes and to submit them for inclusion in future releases.