From ef44657937474145403c2b441b862035914d6a44 Mon Sep 17 00:00:00 2001 From: Nanderty Date: Sun, 26 Mar 2023 16:04:40 +0200 Subject: Snippets --- lua/Snippets/tex/environments.lua | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lua/Snippets/tex/environments.lua (limited to 'lua/Snippets/tex/environments.lua') diff --git a/lua/Snippets/tex/environments.lua b/lua/Snippets/tex/environments.lua new file mode 100644 index 0000000..fd19387 --- /dev/null +++ b/lua/Snippets/tex/environments.lua @@ -0,0 +1,49 @@ +local helper = require('Snippets.luasniphelpers') +local helper = require('Snippets.luasniphelpers') + +return { + -- variable environment + s({ trig = 'beg', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{<>} + <> +\end{<>} +]], + { + i(1), + i(2), + rep(1), + } + ), + { condition = helper.line_begin } + ), + -- enumerate environment + s({ trig = 'enu', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{enumerate*} + \item <> +\end{enumerate*} +]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + -- align environment + s({ trig = 'ali', snippetType = 'autosnippet' }, + fmta( + [[ +\begin{align*} + <> +\end{align*} +]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), +} -- cgit v1.2.3