(This may be less of a feature request than a request for comments and suggestions. I'm also bringing this up now because it might inform the syntax file re-write in #1799.)
TL;DR I'm fed up with looking for color schemes that both look appealing (to me) and highlight TeX code (which I spent about 90% of my time in vim looking at) correctly, so I want to write one that is specifically tuned to TeX.
As far as I understand it, the situation regarding color schemes is roughly the following:
- The builtin syntax file defines a number of (very) TeX-specific syntax groups via regular expressions.
- It then links these to a (smaller) number of TeX-specific highlight groups.
- It then links these to an (even smaller) number of more-or-less standard generic highlight groups.
- (On top of that, vimtex defines even more TeX-specific syntax groups and links them to either specific or generic highlight groups.)
- Color schemes assign colors to (some) of these generic highlight groups and link other groups to these.
This often leads to inconsistent (and inefficient, but that's less of a concern) highlighting, say, for braces or labels. I am therefore looking to short-circuit this by assigning colors directly to a set of generic but TeX-specific highlight groups (which need to be defined first), in particular bypassing the lossy steps 3 and 5.
Roughly, I'd like to distinguish at a glance
- comments,
- math mode contents,
- text mode contents,
- TeX commands and environments,
- labels and references,
- delimiters (braces and backslashes)
Ideally, commands and environments in math and text mode would be colored differently (so that I could have, e.g., dark green commands in math mode that is otherwise colored light green, while commands in text mode would be light blue to only slightly stand out from white on dark text).
What I'd like to ask for here is
a) a bit of explanation and/or documentation of the different syntax/highlight groups vimtex uses (esp. in step 4, which is not so easy to fully understand from the code),
b) some advice which groups would be good to use or define for this purpose (or even adding the latter in vimtex, if this whole thing seems useful for others as well),
c) suggestions for good color schemes (or other advice) from others.
(For the record, the only color schemes I've liked so far for TeX were https://github.com/mhartington/oceanic-next and https://cocopon.github.io/iceberg.vim/ (with some tweaks).)
(This may be less of a feature request than a request for comments and suggestions. I'm also bringing this up now because it might inform the syntax file re-write in #1799.)
TL;DR I'm fed up with looking for color schemes that both look appealing (to me) and highlight TeX code (which I spent about 90% of my time in vim looking at) correctly, so I want to write one that is specifically tuned to TeX.
As far as I understand it, the situation regarding color schemes is roughly the following:
This often leads to inconsistent (and inefficient, but that's less of a concern) highlighting, say, for braces or labels. I am therefore looking to short-circuit this by assigning colors directly to a set of generic but TeX-specific highlight groups (which need to be defined first), in particular bypassing the lossy steps 3 and 5.
Roughly, I'd like to distinguish at a glance
Ideally, commands and environments in math and text mode would be colored differently (so that I could have, e.g., dark green commands in math mode that is otherwise colored light green, while commands in text mode would be light blue to only slightly stand out from white on dark text).
What I'd like to ask for here is
a) a bit of explanation and/or documentation of the different syntax/highlight groups vimtex uses (esp. in step 4, which is not so easy to fully understand from the code),
b) some advice which groups would be good to use or define for this purpose (or even adding the latter in vimtex, if this whole thing seems useful for others as well),
c) suggestions for good color schemes (or other advice) from others.
(For the record, the only color schemes I've liked so far for TeX were https://github.com/mhartington/oceanic-next and https://cocopon.github.io/iceberg.vim/ (with some tweaks).)