vimtricks.wiki Concise Vim tricks, one at a time.

How do I change the color scheme in Vim?

Answer

:colorscheme name

Explanation

The :colorscheme command changes the visual theme of Vim. Color schemes control the colors for syntax highlighting, UI elements, and more.

How it works

  • :colorscheme desert switches to the desert theme
  • :colorscheme without arguments shows the current scheme
  • Tab completion works to show available schemes

Example

:colorscheme desert
:colorscheme slate
:colorscheme elflord

Tips

  • :colorscheme <Tab> lists all available schemes
  • Built-in schemes include: default, desert, elflord, evening, slate, etc.
  • Download additional schemes and put them in ~/.vim/colors/
  • Use set background=dark or set background=light to help the scheme
  • Put colorscheme name in your vimrc for permanent use

Next

How do you yank a single word into a named register?