Pan wrote:
> Vim 7.2.93 in Konsole.
>
> I'd tested that when I set hi Normal ctermbg=NONE in a script, the
> following ctermbg=bg statements after that line will issue error E420e.
>
> Is this a bug or a feature?
>
> Basically, hi Normal ctermbg=NONE will use a "transparent" background,
> i.e. the same background as the terminal emulator regardless of what it
> is. the ctermbg=bg indicates the highlight group uses the same value as
> the Normal group, which can be handy in many cases. It is strange why
> ctermbg=bg is a error when the Normal group has ctermbg=NONE.
>
> Any hints?
It's not like when you use "cterm=bg" that the color follows what the
Normal color is set to. It just uses the current value. And if there
is none at the moment it doesn't work.
If you don't care about the error, you could do this:
try
hi Something ctermbg=bg
catch /E420/
" Ignored
endtry
(untested)
--
hundred-and-one symptoms of being an internet addict:
185. You order fast food over the Internet
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---