MacVim is sourcing its default gvimrc
after your ~/.vimrc
. It contains this snippet:
" Load the MacVim color scheme. This can be disabled by loading another color
" scheme with the :colorscheme command, or by adding the line
" let macvim_skip_colorscheme=1
" to ~/.vimrc.
if !exists("macvim_skip_colorscheme") && !exists("colors_name")
colorscheme macvim
endif
What happens is simple: MacVim's default colorscheme overrides your :hi
commands when you launch Vim and your :hi
commands override the default colorscheme when you source ~/.vimrc
.
The fix is simple too: turn your :hi
commands into a real colorscheme as per Ingo's answer.
Also, set background=light
is only useful in a colorscheme so move that line as well.