Tweaking syntax highlighting

29 views
Skip to first unread message

A. Wik

unread,
Mar 15, 2024, 12:00:49 PMMar 15
to vim_use
Hi all,

I have:
colorscheme blue
set background=dark
hi Error guifg=darkgrey guibg=lightred gui=underline
\ ctermfg=darkgrey ctermbg=lightred
in my .vimrc

Normally, errors are highlighted in lightred foreground on lightred
background, which is, of course, unreadable. Hence the "hi ..."
statement in the .vimrc.

The problem is that the "hi ..." doesn't seem to work if run from
.vimrc, but it works when I run this manually:
:hi Error ctermfg=darkgrey ctermbg=lightred

Am I doing something wrong here?

Regards,
Albert Wik.

Christian Brabandt

unread,
Mar 15, 2024, 1:59:20 PMMar 15
to vim...@googlegroups.com

On Fr, 15 Mär 2024, A. Wik wrote:

> I have:
> colorscheme blue
> set background=dark
> hi Error guifg=darkgrey guibg=lightred gui=underline
> \ ctermfg=darkgrey ctermbg=lightred
> in my .vimrc
>
> Normally, errors are highlighted in lightred foreground on lightred
> background, which is, of course, unreadable. Hence the "hi ..."
> statement in the .vimrc.
>
> The problem is that the "hi ..." doesn't seem to work if run from
> .vimrc, but it works when I run this manually:
> :hi Error ctermfg=darkgrey ctermbg=lightred

What exactly do you mean with "doesn't seem to work" ? What does :hi
Error show? Or even :verbose :hi Error

Thanks,
Christian
--
The bigger the theory the better.

A. Wik

unread,
Mar 16, 2024, 5:48:12 AMMar 16
to vim...@googlegroups.com
After starting up the editor and setting "verbose" to 5, ":hi Error"
reports the following:
Error xxx term=reverse ctermfg=12 ctermbg=12 gui=underline guifg=red
guibg=darkBlue
Last set from c:\prg\vim73\colors\blue.vim

"blue.vim" has the following statement:
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red

-Albert.
Reply all
Reply to author
Forward
0 new messages