my-nvim-config/custom-snippets/tex.snippets
2024-03-13 14:07:20 -05:00

16 lines
344 B
Text

priority -10
extends tex
snippet "\\begin\{(\w+)\}" "multiline begin{} / end{}" rbA
\begin{`!p snip.rv = match.group(1)`}
$1
\end{`!p snip.rv = match.group(1)`}
endsnippet
priority -20
snippet "(?<!^)\\begin\{(\w+)\}" "inline begin{} / end{}" riA
\begin{`!p snip.rv = match.group(1)`} $1 \end{`!p snip.rv = match.group(1)`} $0
endsnippet