From e419285b1f90b0dc77cb3d20bd11ba3c01f5c3bc Mon Sep 17 00:00:00 2001 From: Nanderty Date: Sat, 23 Sep 2023 12:45:34 +0200 Subject: Snippets and code improvements --- lua/Snippets/tex/figures.lua | 55 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) (limited to 'lua/Snippets/tex/figures.lua') diff --git a/lua/Snippets/tex/figures.lua b/lua/Snippets/tex/figures.lua index 3cbed87..81a4368 100644 --- a/lua/Snippets/tex/figures.lua +++ b/lua/Snippets/tex/figures.lua @@ -11,8 +11,7 @@ return { \chemfig { <> } - \caption{ - <> + \caption{<> } \label{fig:<>} \end{figure} @@ -36,8 +35,7 @@ return { <> } \schemestop - \caption{ - <> + \caption{<> } \label{fig:<>} \end{figure} @@ -59,8 +57,7 @@ return { \includegraphics [<>] {<>} - \caption{ - <> + \caption{<> } \label{fig:<>} \end{figure} @@ -84,8 +81,7 @@ return { {<>} {!} {\input{<>}} - \caption{ - <> + \caption{<> } \label{fig:<>} \end{figure} @@ -100,7 +96,7 @@ return { { condition = helper.line_begin } ), - s({ trig = 'sch', snippetType = 'autosnippet' }, + s({ trig = 'scm', snippetType = 'autosnippet' }, fmta( [[ \schemestart @@ -184,6 +180,27 @@ return { { condition = tex.in_figure } ), + s({ trig = 'brc', snippetType = 'autosnippet' }, + fmta( + [[ +\polymerdelim[height = <>, depth = <>, + open xshift=<>, close xshift=<>, + indice = \!\!<>] + {op<>}{cl<>} +]], + { + i(1), + i(2), + i(3), + i(4), + i(5), + i(6), + i(7), + } + ), + { condition = tex.in_figure } + ), + s({ trig = 'nme', snippetType = 'autosnippet' }, fmta( [[ @@ -208,4 +225,24 @@ return { { t('\\oplus') }, { condition = tex.in_figure } ), + + s({ trig = 'crp', snippetType = 'autosnippet' }, + fmta( + [[(-[::<>,0.2,,,draw=none]\oplus)]], + { + i(1), + } + ), + { condition = tex.in_figure } + ), + + s({ trig = 'crm', snippetType = 'autosnippet' }, + fmta( + [[(-[::<>,0.2,,,draw=none]\ominus)]], + { + i(1), + } + ), + { condition = tex.in_figure } + ), } -- cgit v1.2.3