LaTeX-Utilities
LaTeX-Utilities copied to clipboard
Fixed Live Snippet Cursor Steps out of Parentheses
Closes #384
I don't know what the purpose of the removed lines was. It seems like they were there to compensate for the additional characters added by the replacement however I found that vscode handled the cursor placement fine on its own. So instead of fixing a problem, these lines were creating an issue by moving the cursor forward after the snippet has been inserted. This often led to the cursor being moved outside of parentheses and even the math mode entirely which was quite annoying to deal with
Can you make sure that this works with other snippets? As I'm not the one who wrote this, it would take me a while to figure out what this does either.
It works with all snippets I have tested it on which include the following (these work in a variety of math modes (inline, align environment, etc):
- auto subscript
- whitespace before operators
- whitespace after operators
- ...
- implies
- fractions
- not equal
- aligned equal
- approx
- greater than or equal to
- times
- cdot
- pi
- overline
- hat
- partial derivative
- sqrt
- exists
- definite integral
- plus minus