On Wed, May 10, 2006 at 03:41:47PM -0500, Stephen Boulet wrote:
> I have the following line in "mycolors.vim":
>
> hi Keyword term=bold ctermfg=DarkBlue ctermbg=LightGray gui=bold
> guifg=DarkBlue
>
> In vim7 for win32, python words like 'class', 'for', 'def' are dark blue, but
> other works like 'from' and 'import' are not. Are these last two not keywords?
>
> Thanks.
This is determined by the syntax file, probably
$VIMRUNTIME/syntax/python.vim in this case. (You can check this by
looking at the output of
:scriptnames
after loading a python file.) Using the example under
:help synID()
I find that "from" is tagged as pythonPreCondit, ditto for "import".
Now,
:hi pythonPreCondit
:hi PreCondit
:verbose hi PreProc
shows that the colors for these words come from the PreProc group, which
for me is defined in $VIMRUNTIME/syntax/syncolor.vim ; you can override
that in mycolors.vim if you want. A similar exercise shows that "for"
is colored as a Statement, not a Keyword ... but
:hi Keyword
shows that Keyword links to Statement.
HTH --Benji Fisher