summaryrefslogtreecommitdiffstats
path: root/Snippets/tex/greek.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Snippets/tex/greek.lua')
-rw-r--r--Snippets/tex/greek.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/Snippets/tex/greek.lua b/Snippets/tex/greek.lua
new file mode 100644
index 0000000..ebcabfe
--- /dev/null
+++ b/Snippets/tex/greek.lua
@@ -0,0 +1,18 @@
+local in_mathzone = function()
+ return vim.fn['vimtex#syntax#in_mathzone']() == 1
+end
+
+return {
+ s({ trig = "pi", snippetType = "autosnippet" },
+ {
+ t("\\pi"),
+ },
+ { condition = in_mathzone }
+ ),
+ s({ trig = "0eps", snippetType = "autosnippet" },
+ {
+ t("\\epsilon_0"),
+ },
+ { condition = in_mathzone }
+ ),
+}