3
In my .vimrc
, I specify that when I do a search, I want the terms to be highlighted - background color yellow, foreground black. Here's how I specify that:
" Settings for terminal version of vim
:highlight Search ctermbg=yellow ctermfg=black
" Settings for gvim (linux) / macvim
:highlight Search guibg=yellow guifg=black
I'm also using a nice color scheme (railscasts) in Macvim. It seems to override my highlighting colors, however, to something barely visible. If I reload my .vimrc
, all is well again.
Is there a way to cause my .vimrc
settings to win in any conflicts with the color scheme? If not, would it be better to modify the color scheme itself? Write a little script that causes vim to automatically reload the .vimrc
after the color scheme loads? What's the best approach here?
1Have you tried moving this to .gvimrc ? I believe that will be processed after .vimrc. – Jack M. – 2010-11-15T17:34:38.987
@Jack M. - that indeed was the problem. If you care to make your comment into an answer, I will accept it. :) Thank you! – Nathan Long – 2010-11-16T18:32:51.180
Update - I am now using the Solarized color scheme, which is very easy to read and, among other things, sets a good highlighting color for me, so I don't have to do the above at all. – Nathan Long – 2011-11-14T12:26:48.913