diff options
Diffstat (limited to 'lua/Snippets/tex/math.lua')
| -rw-r--r-- | lua/Snippets/tex/math.lua | 80 |
1 files changed, 76 insertions, 4 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index 08a3bfe..411ac7a 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -2,6 +2,14 @@ local tex = require('Snippets.luasniphelperslatex') local helper = require('Snippets.luasniphelpers') return { + s({ trig = '$', snippetType = 'autosnippet' }, + fmta( + '$<>$', + { + i(1), + } + ) + ), s({ trig = '/', snippetType = 'autosnippet' }, fmta( '\\frac{<>}{<>}', @@ -31,16 +39,80 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = "vec", snippetType = "autosnippet" }, + fmta( + '\\vec{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "hat", snippetType = "autosnippet" }, + fmta( + '\\hat{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' }, + fmta( + '^{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = 'll', snippetType = 'autosnippet' }, + fmta( + '_{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "bb", snippetType = "autosnippet" }, + fmta( + '\\left(<>\\right)', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), s({ trig = 'df', snippetType = 'autosnippet' }, { t('\\diff ') }, { condition = tex.in_mathzone } ), - s({ trig = 'ble', snippetType = 'autosnippet' }, - { t('\\left(') }, + s({ trig = "sin", snippetType = "autosnippet" }, + fmta( + '\\sin{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "cos", snippetType = "autosnippet" }, + fmta( + '\\cos{<>}', + { + i(1), + } + ), { condition = tex.in_mathzone } ), - s({ trig = 'bri', snippetType = 'autosnippet' }, - { t('\\right)') }, + s({ trig = "tan", snippetType = "autosnippet" }, + fmta( + '\\tan{<>}', + { + i(1), + } + ), { condition = tex.in_mathzone } ), } |
