On 3/1/07, Alexander Farber <[EMAIL PROTECTED]> wrote:
Hello,

I've spent several hours, but just can't figure out,
why wouldn't Vim 7.0 on my english Win Xp Pro PC
execute the highlight commands from my .vimrc.

I'd like to have my Comments inverted and thus I have:
   hi Comment    guifg=white  guibg=black

in my file "C:\Documents and Settings\afarber\.vimrc"
(fully copied at the bottom of this mail).

When I run ":!cmd" and then "echo %MYVIMRC%"
in the appeared DOS-window then I see:
C:\Documents and Settings\afarber\.vimrc
so my config file is indeed being used.

However when I enter ":verbose hi Comment" I get:

Comment    xxx term=bold ctermfg=1 guifg=Blue
    Last set from C:\Program Files\Vim\vim70\syntax\syncolor.vim

And only if I load ~/.vimrc explicitly by ":so ~/.vimrc"
I get the inverted Comments displayed and see:

Comment    xxx term=bold ctermfg=1 guifg=white guibg=black
    Last set from ~/.vimrc

Does anybody please have an idea what's wrong there?

Defining 'hi...' in vimrc is not good because 'color ...' commands, and
possibly by 'syntax on' commands.
The better method to customize colors is to
copy the colorscheme under your own name and customize the
colorscheme. Alternatively, you could use the autoevents, but these are
more tricky.

Yakov

Reply via email to