On Sun, Apr 16, 2006 at 02:57:37PM +0200, Georg Dahn wrote:
> Hi!
> 
> Since I dislike the highlights of 'Constant' and 'Title', which is 
> Magenta as default, I have defined in my gvimrc:
> 
> hi Constant guifg=Maroon
> hi Title guifg=Maroon
> 
> I have no 'colo ...' or 'set background=...'. When gVim is open, the 
> Title is Maroon, but the Constant still is Magenta. Since in 
> gvimrc_example.vim some highlights are defined, too, I assume that this 
> should work. If I do 'set background=light' before defining above 
> highlights everything works well. In the example file the background is 
> not being set.

On Sun, Apr 16, 2006 at 05:04:19PM +0200, Georg Dahn wrote:
> Hi!
> 
> >     What does
> >
> >:verbose hi Constant guifg=Maroon
> >
> >show?
> 
> Nothing. But the Constants are Maroon afterwards.

     Sorry, I meant to suggest trying

:verbose hi Constant

When I try this, it tells me that the Constant highlighting was set in
$VIMRUNTIME/syntax/syncolor.vim .  This file is :source'd after the
:syn on
command.  In your gvimrc file, do you have the lines to override the
defaults before or after this line?

> Which could be related: I have a color scheme which decides if it takes 
> a dark or light scheme depending on the value of 'background'. In gVim 
> 6.4 I get the light scheme and in gVim 7.0 I get the dark one.
> 
> >     In addition to the above sort of debugging, you can add a line like
> >
> >let g:foo = "2006 April 16 background=" . &background
> >
> >to your color scheme file.  The date stamp is to avoid confusion the
> >*next* time you add debugging comments.
> 
> :eval g:foo
> 
> shows, that the value of 'background' is 'dark'. Shouldn't it be light 
> (docu: When starting the GUI, the default value for 'background' will be 
> "light")?

     The rest of the paragraph you quote contains various exceptions to
this.  I cannot guess what should be happening without seeing more of
your gvimrc file.  What I am sure of is that, when vim processes the
color scheme, 'background' is set to "dark" and so the color scheme is
choosing the way it is supposed to.

HTH                                     --Benji Fisher

Reply via email to