And use the accent engine to make the abar -> \bar{a}
style snippets.
Needed expansions: ^i
, ^j
, ^ij
, ^k
, ^n
, and maybe +1
versions too
We only need to consider collisions with words that start with 1 alphabet letter and then one of these expantions, see regexes.
pi
, pj
, pn
. Matching regex: ^[A-Za-z]p[ijkn]
ip
, jp
, np
. Matching regex: ^[A-Za-z][ijkn]p
So users can easily undo expansions. Maybe even bind DEL in a transient map after expansions to undo expansions.
Look at buffer-undo-list
and how smartparens does it.
The table -> code is preferable I think. Currently we have code -> table but we’d need to separate into separate vars holding snippet list source in order to format it to separate tables.
Store the snippets source in a list/hashmap instead of separate files.
So a_11 becomes a11 - essentially you’d write a11 to get the subscripts.
Sometimes texmathp
isn’t enough. Too many words contain the letters “to” to have
it expand to \to
unconditionally in maths.
I’m not sure how much better we can do in this case compared to just yasnippet.
The Yasnippet route