Recent versions of Vim have a new 'conceal text' function. The syntax highlighting file contains code to work with this feature. The conceal text function collapses a string of text into a single Unicode character. For example, it might visually substitute \beta
with β
.
Vim provides substitutions for the following subscripts by default, replacing the string _X
(where X is one of the following characters) with the Unicode subscript character: 0
, 1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, a
, e
, i
, o
, u
, ,
(replaced with a vertical comma: U+FE10), +
, -
, /
, (
, )
, .
(replaced with a caret: U+2038), r
, v
, x
, \beta
, \delta
, \phi
, \gamma
, \chi
.
The characters that are replaced will appear in a different color (depending on your color scheme and the current conceal mode).
To enable conceal mode, type :set conceallevel=2
in Vim. You'll see these replacements (assuming you have a terminal font that supports the necessary Unicode characters). When your cursor is on a line, the concealed characters are revealed/expanded for easy editing. Use :set conceallevel=0
to disable the concealment.
Vim has many more replacements for superscripts (as more fonts provide a wider variety of superscript glyphs than subscript glyphs).
The conceal mode becomes rather useful with it comes to mathematics:
\[
e^{ix} + \alpha - \beta
\]
is displayed as
eⁱˣ + α - β.
To answer your questions more directly:
What is special about these letters?
Why does the syntax consider them different?
The only thing special about those letters are that Vim's syntax highlighting file provides functions to conceal those particular subscript letters with suitable Unicode glyphs.
Is there a flavor of TeX where the difference is meaningful?
Nope. It's all the same to TeX.
Best Answer
If you put an accent over a single character, TeX uses information in the font metrics to shift the accent to take some account of the slope of the italic letters. Which is why the first one shifts. If you put an accent over a more complicated math list then it's just centered over the list.