[EMAIL PROTECTED] wrote:
Hello,
in my old gvim62 installation I do a few highlight commands in the
$VIM/_gvimrc:
highlight Comment guifg=DarkGreen guibg=background
...
Now in my new vim70 installation this seems to be overwritten somewhere.
The _gvimrc *is* sourced (- :scriptnames)
If I do the highlight command manually it works.
Where may the highlight be overwritten resp. where should I place the
highlight command instead?
Thank You
Joachim
[gvim70 WinXP]
###
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
1. In Vim 7 (not in Vim 6), doing
:verbose highlight Comment
will tell you which script (if any) last changed that highlight.
2. If you use a colorscheme, any own-coded highlight settings should
of course come after the :colorscheme statement. (If you invoke the
colorscheme in your vimrc and these :highlight statements are in your
gvimrc, it should be OK.) Also after syntax on since the latter will
cause your colorscheme (if any) to be re-sourced and, in any case, the
highlight settings from your gvimrc will be lost.
3. It might be worth your while to make your own colorscheme. This will
make sure that any syntax on statement will invoke it.
3a. If you are already using a colorscheme: copy it into ~/.vim/colors
(on Unix) or into ~/vimfiles/colors (on Windows) under a different name,
but still with the .vim extension. Then add or change any :hi
statements to suit you, change the :let g:colors_name line to reflect
the new name, and alter the :colorscheme statement in your vimrc so
that this new colorscheme is invoked.
3b: If you aren't yet using a colorscheme: I'm attaching a simple one as
an example. Drop it in ~/.vim/colors or ~/vimfiles/colors (depending on
your OS) and proceed as in step 3a. _Add_ the line colorscheme
almost-default (or whatever) to your vimrc to invoke it.
Best regards,
Tony.
Vim color file
Maintainer: Tony Mechelynck [EMAIL PROTECTED]
Last Change: 2006 Aug 16
This is almost the default color scheme. It doesn't define the Normal
highlighting, it uses whatever the colors used to be.
Only the few highlight groups named below are defined; the rest (most of
them) are left at their compiled-in default settings.
Set 'background' back to the default. The value can't always be estimated
and is then guessed.
hi clear Normal
set bg
Remove all existing highlighting and set the defaults.
hi clear
Load the syntax highlighting defaults, if it's enabled.
if exists(syntax_on)
syntax reset
endif
Set our own highlighting settings
hi Errorguibg=red
guifg=black
hi clear ErrorMsg
hi link ErrorMsg Error
hi CursorLine guibg=#F4F4F4
hi clear CursorColumn
hi link CursorColumn CursorLine
hi clear helpBar
hi link helpBarhelpHyperTextJump
hi clear helpStar
hi link helpStar helpHyperTextEntry
hi StatusLine gui=NONE,bold guibg=red
guifg=white
hi StatusLineNC gui=reverse,bold
hi TabLine gui=NONEguibg=#DD
guifg=black
hi TabLineFill gui=NONEguibg=#AA
guifg=red
hi User1ctermfg=magenta guibg=white
guifg=magenta
hi User2ctermfg=darkmagenta guibg=#DD
guifg=magenta
remember the current colorscheme name
let colors_name = almost-default
vim: sw=2