Skip to content

Commit

Permalink
cleanup(tex): subscript and superscript would trigger outside math
Browse files Browse the repository at this point in the history
These snippets would expand anywhere, not only in math mode
  • Loading branch information
cristobaltapia authored and lpil committed Jan 16, 2022
1 parent 9504f21 commit 8e187e5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions UltiSnips/tex.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,6 @@ snip.rv = stripped[0:i] + "\\frac{" + stripped[i+1:-1] + "}"
`{$1}$0
endsnippet

snippet '([A-Za-z])_\{(\d+)\}(\d)' "Auto subscript 3+" wrA
`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2) + match.group(3)`}
endsnippet

snippet '([A-Za-z])\^\{(\d+)\}(\d)' "Auto superscript" wrA
`!p snip.rv = match.group(1)`^{`!p snip.rv = match.group(2) + match.group(3)`}
endsnippet

snippet compl "Complement" i
^{c}
endsnippet
Expand Down

0 comments on commit 8e187e5

Please sign in to comment.