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 desertswitches to the desert theme:colorschemewithout 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=darkorset background=lightto help the scheme - Put
colorscheme namein your vimrc for permanent use