Search code examples
vim

Vim colorscheme change


I'm having difficulty getting my colorscheme to change. I've opened both ~/.vimrc and /usr/share/vim/vimrc and added:

colorscheme desert

...and nothing. I noticed the color schemes are here:

/usr/share/vim/vim72/colors/desert.vim (...along with a bunch or others)

which seems like the wrong place so I:

cp /usr/share/vim/vim72/colors/desert.vim ~/.vim/colors/

and still no go.


Solution

  • Custom colorschemes should go in ~/.vim/colors/, and adding the colorscheme line in your ~/.vimrc should work. So it sounds like you're doing that right.

    Double-check that you don't have some other colorscheme line lower down in your vimrc or in an included config file that might be overriding it.

    Also double-check that your .vimrc is being loaded as expected. One easy way to tell is by trying to load a nonexistant colorscheme name - if the line is being parsed, then you should get an error like:

    E185: Cannot find color scheme foobarbaz
    

    If your colorscheme line is being correctly parsed, you need to check if your terminal is correctly configured to display the colors.