2022-09-09 00:16:11 +02:00
|
|
|
local A = require("my.abbreviations")
|
|
|
|
|
2022-09-12 13:50:02 +02:00
|
|
|
require("my.helpers.wrapMovement").setup()
|
|
|
|
|
2022-09-09 00:16:11 +02:00
|
|
|
vim.opt.conceallevel = 1
|
|
|
|
vim.opt.wrap = true
|
|
|
|
|
|
|
|
vim.g.tex_conceal = "abdmg"
|
|
|
|
|
|
|
|
local abbreviations = {
|
|
|
|
-- Greek chars
|
|
|
|
{ "eps", "\\epsilon" },
|
|
|
|
{ "delta", "\\delta" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "pi", "\\pi" },
|
2022-09-25 22:03:11 +02:00
|
|
|
{ "psi", "\\psi" },
|
|
|
|
{ "psi", "\\psi" },
|
|
|
|
{ "alpha", "\\alpha" },
|
|
|
|
{ "beta", "\\beta" },
|
|
|
|
{ "gamma", "\\gamma" },
|
2022-09-12 13:50:02 +02:00
|
|
|
{ "nuls", "\\varnothing" },
|
2022-09-09 00:16:11 +02:00
|
|
|
|
|
|
|
-- Exponents
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "ei", "^{-1}" },
|
|
|
|
{ "e0", "^{0}" },
|
2022-09-09 00:16:11 +02:00
|
|
|
{ "e1", "^{1}" },
|
|
|
|
{ "e2", "^{2}" },
|
|
|
|
{ "e3", "^{3}" },
|
|
|
|
{ "e4", "^{4}" },
|
|
|
|
{ "en", "^{n}" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "etn", "^{-}" },
|
2022-09-25 22:03:11 +02:00
|
|
|
{ "ett", "^{t}" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "etp", "^{+}" },
|
2022-09-09 00:16:11 +02:00
|
|
|
|
|
|
|
-- Subscripts
|
|
|
|
{ "s0", "_{0}" },
|
|
|
|
{ "s1", "_{1}" },
|
|
|
|
{ "s2", "_{2}" },
|
|
|
|
{ "s3", "_{3}" },
|
|
|
|
{ "s4", "_{4}" },
|
|
|
|
{ "sn", "_{n}" },
|
|
|
|
|
|
|
|
-- Function calls
|
|
|
|
{ "fx", "f(x)" },
|
|
|
|
{ "gx", "g(x)" },
|
|
|
|
{ "hx", "h(x)" },
|
|
|
|
{ "Px", "P(x)" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "Pn", "P(n)" },
|
|
|
|
{ "foa", "f(a)" },
|
|
|
|
{ "goa", "g(a)" },
|
|
|
|
{ "hoa", "h(a)" },
|
|
|
|
{ "dfx", "f'(x)" },
|
|
|
|
{ "dgx", "g'(x)" },
|
|
|
|
{ "dhx", "h'(x)" },
|
2022-09-09 00:16:11 +02:00
|
|
|
|
|
|
|
-- Basic commands
|
2022-09-26 02:17:39 +02:00
|
|
|
{ "creq", "\\\\&=" },
|
|
|
|
{ "aeq", "&=" },
|
2022-09-09 00:16:11 +02:00
|
|
|
{ "leq", "\\leq" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "geq", "\\geq" },
|
|
|
|
{ "sdiff", "\\setminus" },
|
2022-09-12 13:50:02 +02:00
|
|
|
{ "sst", "\\subset" },
|
|
|
|
{ "sseq", "\\subseteq" },
|
2022-09-09 00:16:11 +02:00
|
|
|
{ "neq", "\\neq" },
|
|
|
|
{ "nin", "\\not\\in" },
|
|
|
|
{ "iin", "\\in" },
|
|
|
|
{ "tto", "\\to" },
|
2022-09-12 13:50:02 +02:00
|
|
|
{ "iip", "\\implies" },
|
2022-09-09 00:16:11 +02:00
|
|
|
{ "iff", "\\iff" },
|
|
|
|
{ "land", "\\land" },
|
|
|
|
{ "lor", "\\lor" },
|
2022-09-25 22:03:11 +02:00
|
|
|
{ "ssin", "\\sin" },
|
|
|
|
{ "ccos", "\\cos" },
|
|
|
|
{ "lln", "\\ln" },
|
2022-09-09 00:16:11 +02:00
|
|
|
{ "frl", "\\forall" },
|
|
|
|
{ "exs", "\\exists" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "iinf", "\\infty" },
|
|
|
|
{ "ninf", "-\\infty" },
|
|
|
|
{ "nlnl", "\\pm" }, -- had this as npnp first but it was hard-ish to type
|
|
|
|
{ "ccup", "\\cup" },
|
|
|
|
{ "ccap", "\\cap" },
|
|
|
|
{ "nope", "\\bot" },
|
|
|
|
{ "yee", "\\top" },
|
2022-09-25 22:03:11 +02:00
|
|
|
{ "ccan", "\\cancel" },
|
2022-09-18 01:00:32 +02:00
|
|
|
{ "mul", "\\cdot" },
|
|
|
|
{ "smul", "\\times" },
|
|
|
|
{ "texpl", "&& \\text{}" },
|
|
|
|
{ "card", "\\#" }
|
2022-09-09 00:16:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
A.manyLocalAbbr(abbreviations)
|