On 24/05/11 22:35, ZyX wrote:
While using wombat256mod I found out that it somehow sets&background to 'light'
but the only line containing reference to 'background' is `set background=dark'.
Wombat256mod colorscheme is a colorscheme with dark backround and wrong value of
&bg confused my format.vim plugin. After some experiments I found that source of
the problem is the line
hi Normal ctermfg=252 ctermbg=234
cterm=none
guifg=#e3e0d7 guibg=#242424 gui=none
ctermbg=234 is a dark grey color a bit lighter then ctermbg=Black, so setting
background to light is wrong. Also note that such behavior is referenced neither
in `:h :hi-normal' nor in `:h 'bg''. What for vim is altering 'bg' option if it
is already set in colorscheme? I guess it should not be done at all.
This behavior is reproducible with
vim -u NONE -c 'set bg?' -c 'hi Normal ctermbg=234' -c 'set bg?'
.
This is where it is documented:
*:hi-normal-cterm*
When setting the "ctermfg" or "ctermbg" colors for the Normal group,
these will become the colors used for the non-highlighted text.
Example: >
:highlight Normal ctermfg=grey ctermbg=darkblue
< When setting the "ctermbg" color for the Normal group, the
'background' option will be adjusted automatically. This causes the
highlight groups that depend on 'background' to change! This means
you should set the colors for Normal first, before setting other
colors.
Best regards,
Tony.
--
"I am not now, and never have been, a girlfriend of Henry Kissinger."
-- Gloria Steinem
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php