-
Notifications
You must be signed in to change notification settings - Fork 407
Treating \tag{} like \text{} for Snippets #2644
Description
Is your feature request related to a problem? Please describe it.
My feature request is related to the fact that I utilize Ultisnips a lot for LaTeX writing. Specifically, I write with equations a lot with the amsmath package, and one of the LaTeX commands found in the package amsmath is the \tag{} command which is used to neatly label each line in environments like align*. As far as I know, its behavior is identical to that of \text{} with the sole purpose of labeling equations.
I set up a context with vimtex#syntax#in_mathzone() for my snippets to auto expand, but a constant annoyance is that my snippets will also expand within \tag{}. For example, I defined a snippet for "lim" to expand into \lim\limits_{$1}^{$2}$0. Typing "lim" in \text{} does not trigger the snippet, but it does in \tag{}.
Describe the solution you'd like
I would like vimtex#syntax#in_mathzone() to exclude \tag{} if that is the right term, so my snippets won't auto expand inside of the command. If doing so is too much of a hassle, then I am open to other solutions that don't involve modifying mathzone, but I am unsure if any exist.
Describe alternatives you've considered
An alternative would be to utilize \text{} instead of \tag{} to label my equations; however, due to personal preference, laziness, and habit, I am more used to \tag{} than \text{} for equations. So, it would benefit me immensely (and possibly other people?) if mathzone was modified so that\tag{} won't trigger the snippets.
Anyway, thank you for creating such an amazing plugin, and thank you for considering this rather odd suggestion!