> Hmm, I think "combine" would express better what this is doing:
> combining the existing attributes with those in the current
> syntax/highlight item. One can also combine a fg and bg color, but a
> new fg color would overrule an existing fg color (we don't mix colors).
>
SGTM
> We don't need the patch for += and -= then, right?
>
Correct. If you agree, I'd like to hijack that syntax to remove the need
for "removeattrs" (see the other patch I posted) and to inherit from other
highlight groups, as shown below.
I played with this patch all Sunday, and the two things it left me really
wanting to do were:
highlight inherit BoldComment Comment term-=italic term+=bold
and
syntax region Unbold start='\~' end='\~' combine
highlight Unbold cterm-=bold
Highight-inherit should be pretty easy to implement. Allowing -= on
syntax-combine groups will be a little trickier, requiring a second set of
flags for attributes that have been explicitly turned off.
+= wouldn't be strictly necessary (= could be used in its place w.l.g.) but
is nice to provide symmetry for -=. Another possible syntax would be using
'=' and '!', as in
highlight Unbold cterm!bold
or perhaps
highlight Unbold cterm~bold
or !=, ~=, or whatever you prefer. I'm indifferent to the syntax.
Regardless, both of those features can come in later patches: the 'combine'
functionality is quite useful as-is. I'll update the name to 'combine' when
I get home from work tonight.
--
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