LaTeX-Utilities icon indicating copy to clipboard operation
LaTeX-Utilities copied to clipboard

Fixed Live Snippet Cursor Steps out of Parentheses

Open josiahnross opened this issue 2 years ago • 2 comments

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

josiahnross avatar Apr 26 '23 23:04 josiahnross

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.

leoleoasd avatar Apr 28 '23 06:04 leoleoasd

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

josiahnross avatar May 01 '23 16:05 josiahnross