I'm a bit stuck on how synID* should work in this context.
The problem is that synID() returns the id of the *highlight group*, not the
syntax match. In the following example:
syntax match Foo 'foo' combine
syntax match Bar 'bar'
highlight link Foo Comment
highlight link Bar Comment
if you have the highlight id for 'Comment', I can't reliably tell you whether
or not it's going to combine with attributes further up the stack.
The best I can think to do is one of:
1. Add synmatchID() and synmatchIDattr()
2. Add syncombines(line, col) which tells you if you also need to consult
the rest of the synstack() for attributes.
Honestly I think that these functions are a bit misnamed and would prefer them
to be 'hlID', 'hlIDattr', hlIDtrans', 'synID', 'synIDattr', and 'synIDtrans'
(the *trans functions always returning lists), but that's backwards
compatibility breaking.
Does anyone have preference where we go? I don't have the experience with
synID* to choose the 'right' decision.
--
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