my-nvim-config/custom-snippets/tex.snippets

17 lines
344 B
Text
Raw Normal View History

2024-03-13 14:07:20 -05:00
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