-
Notifications
You must be signed in to change notification settings - Fork 407
Expanding ToC syntax for sections #2221
Description
Is your feature request related to a problem? Please describe it.
In the ToC, chapter/section labels like chap:foo or sec:bar get special syntax highlighting as defined in autoload/vimtex/toc.vim
vimtex/autoload/vimtex/toc.vim
Lines 373 to 376 in e429bb6
| syntax match VimtexTocLabelsSecs /\v(chap|sec):.*$/ contained | |
| syntax match VimtexTocLabelsEq /eq:.*$/ contained | |
| syntax match VimtexTocLabelsFig /fig:.*$/ contained | |
| syntax match VimtexTocLabelsTab /tab:.*$/ contained |
It might be nice to be able to configure this, e.g. for subsections subsec:baz, or or if someone wanted to use a different abbreviation, say \label{chpt:foo} (I'm not sure whether there's an 'official' guide on what abbreviations to use, or whether it's just a convention 😄). Basically, something like (probably simpler than the todo labels, actually)g:vimtex_toc_todo_labels but for sections instead of todos.
Right now subsections especially tend to get a little bit messed up because the syntax matches the second half of subsec:baz, e.g.
