From c456976987b05a5add43d6fe8379dcec4cbde2de Mon Sep 17 00:00:00 2001 From: Nanderty Date: Wed, 29 Mar 2023 21:11:32 +0200 Subject: Snippet, fixes, additions --- lua/Snippets/tex/environments.lua | 4 ++-- lua/Snippets/tex/greek.lua | 17 ----------------- lua/Snippets/tex/math.lua | 17 +++++++++++++++++ lua/Snippets/tex/symbols.lua | 23 +++++++++++++++++++++++ 4 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 lua/Snippets/tex/greek.lua create mode 100644 lua/Snippets/tex/symbols.lua (limited to 'lua/Snippets/tex') diff --git a/lua/Snippets/tex/environments.lua b/lua/Snippets/tex/environments.lua index fd19387..c4bb38a 100644 --- a/lua/Snippets/tex/environments.lua +++ b/lua/Snippets/tex/environments.lua @@ -22,9 +22,9 @@ return { s({ trig = 'enu', snippetType = 'autosnippet' }, fmta( [[ -\begin{enumerate*} +\begin{enumerate} \item <> -\end{enumerate*} +\end{enumerate} ]], { i(1), diff --git a/lua/Snippets/tex/greek.lua b/lua/Snippets/tex/greek.lua deleted file mode 100644 index f47cdac..0000000 --- a/lua/Snippets/tex/greek.lua +++ /dev/null @@ -1,17 +0,0 @@ -local tex = require('Snippets.luasniphelperslatex') -local helper = require('Snippets.luasniphelpers') - -return { - s({ trig = "pi", snippetType = "autosnippet" }, - { - t("\\pi"), - }, - { condition = tex.in_mathzone } - ), - s({ trig = "0eps", snippetType = "autosnippet" }, - { - t("\\epsilon_0"), - }, - { condition = tex.in_mathzone } - ), -} diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index 670ed80..9d50cb0 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -22,8 +22,25 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = "tex", snippetType = "autosnippet" }, + fmta( + '\\text{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), s({ trig = 'df', snippetType = 'autosnippet' }, { t('\\diff ') }, { condition = tex.in_mathzone } ), + s({ trig = 'ple', snippetType = 'autosnippet' }, + { t('\\left(') }, + { condition = tex.in_mathzone } + ), + s({ trig = 'pri', snippetType = 'autosnippet' }, + { t('\\right)') }, + { condition = tex.in_mathzone } + ), } diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua new file mode 100644 index 0000000..684d9ed --- /dev/null +++ b/lua/Snippets/tex/symbols.lua @@ -0,0 +1,23 @@ +local tex = require('Snippets.luasniphelperslatex') +local helper = require('Snippets.luasniphelpers') + +return { + s({ trig = "pi", snippetType = "autosnippet" }, + { + t("\\pi"), + }, + { condition = tex.in_mathzone } + ), + s({ trig = "0eps", snippetType = "autosnippet" }, + { + t("\\epsilon_0"), + }, + { condition = tex.in_mathzone } + ), + s({ trig = "app", snippetType = "autosnippet" }, + { + t("\\approx"), + }, + { condition = tex.in_mathzone } + ), +} -- cgit v1.2.3