Dotfiles with the latest changes
This commit is contained in:
@@ -25,7 +25,7 @@ local item = s(
|
||||
{ trig = "-it", desc = "Itemize & Enumerate Item" },
|
||||
fmt(
|
||||
[[
|
||||
\item {}
|
||||
\item{}
|
||||
]],
|
||||
{
|
||||
i(1, "Bulletpoint"),
|
||||
@@ -39,9 +39,7 @@ local tableenv = s(
|
||||
fmt(
|
||||
[[
|
||||
\begin{{tabular}}{{|{}}}
|
||||
\toprule
|
||||
{}
|
||||
\bottomrule
|
||||
\end{{tabular}}
|
||||
|
||||
{}
|
||||
@@ -51,7 +49,7 @@ local tableenv = s(
|
||||
local col = tonumber(snip.captures[2])
|
||||
local result = ""
|
||||
for j = 1, col do
|
||||
result = result .. "c|"
|
||||
result = result .. " c |"
|
||||
j = j + 1
|
||||
end
|
||||
return sn(nil, t(result))
|
||||
@@ -62,7 +60,16 @@ local tableenv = s(
|
||||
local node = {}
|
||||
local p = 1
|
||||
table.insert(node, i(p))
|
||||
for j = 1, row - 1 do
|
||||
for k = 1, col - 1 do
|
||||
p = p + 1
|
||||
table.insert(node, t(" & "))
|
||||
table.insert(node, i(p))
|
||||
k = k + 1
|
||||
end
|
||||
table.insert(node, t({ "\\\\", " \\hline", " " }))
|
||||
p = p + 1
|
||||
table.insert(node, i(p))
|
||||
for j = 1, row - 2 do
|
||||
for k = 1, col - 1 do
|
||||
p = p + 1
|
||||
table.insert(node, t(" & "))
|
||||
@@ -70,6 +77,8 @@ local tableenv = s(
|
||||
k = k + 1
|
||||
end
|
||||
table.insert(node, t({ "\\\\", " " }))
|
||||
p = p + 1
|
||||
table.insert(node, i(p))
|
||||
j = j + 1
|
||||
end
|
||||
for k = 1, col - 1 do
|
||||
@@ -141,6 +150,21 @@ table.insert(autosnippets, figcap)
|
||||
|
||||
-- Math --
|
||||
|
||||
local qed = s(
|
||||
{ trig = "qed", regTrig = true, desc = "qed" },
|
||||
fmt(
|
||||
[[
|
||||
\square
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, qed)
|
||||
|
||||
local matrix = s(
|
||||
{ trig = "(.)mat(%d) (%d)", regTrig = true, desc = "Matrix Environment" },
|
||||
fmt(
|
||||
@@ -188,6 +212,33 @@ local matrix = s(
|
||||
)
|
||||
table.insert(autosnippets, matrix)
|
||||
|
||||
local mp = s(
|
||||
{ trig = "mp", regTrig = true, desc = "modus ponens" },
|
||||
fmt(
|
||||
[[
|
||||
\begin{{tabular}}{{l}}
|
||||
{}\\
|
||||
{}\\
|
||||
\hline
|
||||
{}\\
|
||||
\end{{tabular}}
|
||||
|
||||
{}
|
||||
]],
|
||||
{
|
||||
i(1, "Lemmna 1"),
|
||||
i(2, "Lemmna 2"),
|
||||
i(3, "Conclusion"),
|
||||
i(4),
|
||||
}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, mp)
|
||||
|
||||
local mk = s(
|
||||
{ trig = "mk", desc = "Math" },
|
||||
fmt(
|
||||
@@ -207,7 +258,7 @@ local md = s(
|
||||
fmt(
|
||||
[[
|
||||
\[
|
||||
{}
|
||||
{}
|
||||
.\]
|
||||
|
||||
{}
|
||||
@@ -415,6 +466,42 @@ local bar = s(
|
||||
)
|
||||
table.insert(autosnippets, bar)
|
||||
|
||||
local dot = s(
|
||||
{ trig = "-dot", regTrig = true, desc = "dot" },
|
||||
fmt(
|
||||
[[
|
||||
\dot{{{}}}{}
|
||||
]],
|
||||
{
|
||||
i(1, "Dot Variable"),
|
||||
i(0),
|
||||
}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, dot)
|
||||
|
||||
local vector = s(
|
||||
{ trig = "-vec", regTrig = true, desc = "vector" },
|
||||
fmt(
|
||||
[[
|
||||
\vec{{{}}}{}
|
||||
]],
|
||||
{
|
||||
i(1, "Vector Variable"),
|
||||
i(0),
|
||||
}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, vector)
|
||||
|
||||
local tilde = s(
|
||||
{ trig = "(%w+)tilde", regTrig = true, desc = "tilde" },
|
||||
fmt(
|
||||
@@ -766,11 +853,11 @@ local inverse = s(
|
||||
table.insert(autosnippets, inverse)
|
||||
|
||||
local rightarrow = s(
|
||||
{ trig = "ra", desc = "Right Arrow" },
|
||||
{ trig = "-ra", desc = "Right Arrow" },
|
||||
fmt(
|
||||
[[
|
||||
\rightarrow
|
||||
]],
|
||||
\rightarrow
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
@@ -780,8 +867,23 @@ local rightarrow = s(
|
||||
)
|
||||
table.insert(autosnippets, rightarrow)
|
||||
|
||||
local Rightarrow = s(
|
||||
{ trig = "-Ra", desc = "Right Arrow" },
|
||||
fmt(
|
||||
[[
|
||||
\Rightarrow
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, Rightarrow)
|
||||
|
||||
local leftarrow = s(
|
||||
{ trig = "la", desc = "Left Arrow" },
|
||||
{ trig = "-la", desc = "Left Arrow" },
|
||||
fmt(
|
||||
[[
|
||||
\leftarrow
|
||||
@@ -795,6 +897,233 @@ local leftarrow = s(
|
||||
)
|
||||
table.insert(autosnippets, leftarrow)
|
||||
|
||||
local land = s(
|
||||
{ trig = "land", regTrig = true, desc = "Logic and" },
|
||||
fmt(
|
||||
[[
|
||||
\land
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, land)
|
||||
|
||||
local lor = s(
|
||||
{ trig = "lor", regTrig = true, desc = "Logic or" },
|
||||
fmt(
|
||||
[[
|
||||
\lor
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, lor)
|
||||
|
||||
local exists = s(
|
||||
{ trig = "exists", regTrig = true, desc = "Logic exists" },
|
||||
fmt(
|
||||
[[
|
||||
\exists
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, exists)
|
||||
|
||||
local forall = s(
|
||||
{ trig = "forall", regTrig = true, desc = "Logic for all" },
|
||||
fmt(
|
||||
[[
|
||||
\forall
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, forall)
|
||||
|
||||
local neg = s(
|
||||
{ trig = "neg", regTrig = true, desc = "Logic negative" },
|
||||
fmt(
|
||||
[[
|
||||
\neg
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, neg)
|
||||
|
||||
local xor = s(
|
||||
{ trig = "xor", regTrig = true, desc = "Logic xor" },
|
||||
fmt(
|
||||
[[
|
||||
\dot{{\lor}}
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, xor)
|
||||
|
||||
local sit = s(
|
||||
{ trig = "in", regTrig = true, desc = "Set in" },
|
||||
fmt(
|
||||
[[
|
||||
\in
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, sit)
|
||||
|
||||
local snin = s(
|
||||
{ trig = "nin", regTrig = true, desc = "Set no in" },
|
||||
fmt(
|
||||
[[
|
||||
\notin
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, snin)
|
||||
|
||||
local cup = s(
|
||||
{ trig = "cup", regTrig = true, desc = "Set union" },
|
||||
fmt(
|
||||
[[
|
||||
\cup
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, cup)
|
||||
|
||||
local cap = s(
|
||||
{ trig = "cap", regTrig = true, desc = "Set intersection" },
|
||||
fmt(
|
||||
[[
|
||||
\cap
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, cap)
|
||||
|
||||
local complement = s(
|
||||
{ trig = "comp", regTrig = true, desc = "Set complement" },
|
||||
fmt(
|
||||
[[
|
||||
^\complement
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, complement)
|
||||
|
||||
local minus = s(
|
||||
{ trig = "not", regTrig = true, desc = "Set minus" },
|
||||
fmt(
|
||||
[[
|
||||
\setminus
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, minus)
|
||||
|
||||
local times = s(
|
||||
{ trig = "times", regTrig = true, desc = "Set times" },
|
||||
fmt(
|
||||
[[
|
||||
\times
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, times)
|
||||
|
||||
local setinlucsion = s(
|
||||
{ trig = "setin", desc = "Set set in" },
|
||||
fmt(
|
||||
[[
|
||||
\subseteq
|
||||
]],
|
||||
{}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, setinlucsion)
|
||||
|
||||
local setbuilder = s(
|
||||
{ trig = "-set", regTrig = true, desc = "Set set builder" },
|
||||
fmt(
|
||||
[[
|
||||
\{{ {} \}}
|
||||
]],
|
||||
{
|
||||
i(1, "Set"),
|
||||
}
|
||||
),
|
||||
{
|
||||
condition = math,
|
||||
show_condition = math,
|
||||
}
|
||||
)
|
||||
table.insert(autosnippets, setbuilder)
|
||||
|
||||
-- Greek Letters --
|
||||
|
||||
local degree = s(
|
||||
@@ -1266,7 +1595,7 @@ local phi = s(
|
||||
{ trig = "phi", desc = "phi" },
|
||||
fmt(
|
||||
[[
|
||||
\phi
|
||||
\varphi
|
||||
]],
|
||||
{}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user