Start working on a more modern latex snippet system
This commit is contained in:
parent
b0ff2979ed
commit
a47be3adf9
5 changed files with 283 additions and 190 deletions
home/features/neovim/snippets/snippets/latex
|
@ -1,13 +1,4 @@
|
|||
{
|
||||
"Begin": {
|
||||
"prefix": "begin",
|
||||
"description": "Begin anything",
|
||||
"body": [
|
||||
"\\begin{$1}",
|
||||
"\t$0",
|
||||
"\\end{$1}"
|
||||
]
|
||||
},
|
||||
"Set": {
|
||||
"prefix": "set",
|
||||
"description": "Set I guess",
|
||||
|
@ -38,69 +29,6 @@
|
|||
"description": "Inner product of a vector with itself",
|
||||
"body": "\\dprod{$1}$0"
|
||||
},
|
||||
"Lemma": {
|
||||
"prefix": "lemma",
|
||||
"description": "Create a lemma",
|
||||
"body": [
|
||||
"\\begin{lemma}[$1]\\label{lem:$1}",
|
||||
"\t$0",
|
||||
"\\end{lemma}"
|
||||
]
|
||||
},
|
||||
"Example*": {
|
||||
"prefix": "example*",
|
||||
"description": "Create an example*",
|
||||
"body": [
|
||||
"\\begin{example*}",
|
||||
"\t$0",
|
||||
"\\end{example*}"
|
||||
]
|
||||
},
|
||||
"Example": {
|
||||
"prefix": "example",
|
||||
"description": "Create an example",
|
||||
"body": [
|
||||
"\\begin{example}[$1]\\label{exp:$1}",
|
||||
"\t$0",
|
||||
"\\end{example}"
|
||||
]
|
||||
},
|
||||
"Theorem": {
|
||||
"prefix": "theorem",
|
||||
"description": "Create a theorem",
|
||||
"body": [
|
||||
"\\begin{theorem}[$1]\\label{thm:$1}",
|
||||
"\t$0",
|
||||
"\\end{theorem}"
|
||||
]
|
||||
},
|
||||
"Exercise": {
|
||||
"prefix": "exercise",
|
||||
"description": "Create a exercise",
|
||||
"body": [
|
||||
"\\begin{exercise}[$1]\\label{exe:$1}",
|
||||
"\t$0",
|
||||
"\\end{exercise}"
|
||||
]
|
||||
},
|
||||
"Definition": {
|
||||
"prefix": "definition",
|
||||
"description": "Create a definition",
|
||||
"body": [
|
||||
"\\begin{definition}[$1]\\label{def:$1}",
|
||||
"\t$0",
|
||||
"\\end{definition}"
|
||||
]
|
||||
},
|
||||
"Display math": {
|
||||
"prefix": "dm",
|
||||
"description": "Display math section",
|
||||
"body": [
|
||||
"\\[",
|
||||
"$0",
|
||||
"\\]"
|
||||
]
|
||||
},
|
||||
"Subscript": {
|
||||
"prefix": "ss",
|
||||
"description": "Subscript",
|
||||
|
@ -126,80 +54,6 @@
|
|||
"description": "The set of Z/nZ",
|
||||
"body": "\\mathbb{Z}/$1\\mathbb{Z}$0"
|
||||
},
|
||||
"Section": {
|
||||
"prefix": "section",
|
||||
"description": "Add section",
|
||||
"body": [
|
||||
"\\section{$1}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Subsection": {
|
||||
"prefix": "subsection",
|
||||
"description": "Add subsection",
|
||||
"body": [
|
||||
"\\subsection{$1}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Subsubsection": {
|
||||
"prefix": "subsubsection",
|
||||
"description": "Add subsubsection",
|
||||
"body": [
|
||||
"\\subsubsection{$1}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Chapter": {
|
||||
"prefix": "chapter",
|
||||
"description": "Add chapter",
|
||||
"body": [
|
||||
"\\chapter{$1}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"Proof": {
|
||||
"prefix": "proof",
|
||||
"description": "Create proof",
|
||||
"body": [
|
||||
"\\begin{proof}",
|
||||
"\t$0",
|
||||
"\\end{proof}"
|
||||
]
|
||||
},
|
||||
"Itemize": {
|
||||
"prefix": "item",
|
||||
"body": [
|
||||
"\\\\begin{itemize}",
|
||||
"\t\\item $0",
|
||||
"\\\\end{itemize}"
|
||||
],
|
||||
"description": "Itemize env"
|
||||
},
|
||||
"Enumerate": {
|
||||
"prefix": "enum",
|
||||
"body": [
|
||||
"\\\\begin{enumerate}",
|
||||
"\t\\item $0",
|
||||
"\\\\end{enumerate}"
|
||||
],
|
||||
"description": "Enumerate env"
|
||||
},
|
||||
"Reference definition": {
|
||||
"prefix": "rdef",
|
||||
"description": "Reference a definition",
|
||||
"body": "\\ref{def:$1}$0"
|
||||
},
|
||||
"Reference lemma": {
|
||||
"prefix": "rlemma",
|
||||
"description": "Reference a lemma",
|
||||
"body": "\\ref{lem:$1}$0"
|
||||
},
|
||||
"Reference theorem": {
|
||||
"prefix": "rtheorem",
|
||||
"description": "Reference a theorem",
|
||||
"body": "\\ref{thm:$1}$0"
|
||||
},
|
||||
"Sigma sum": {
|
||||
"prefix": "bsum",
|
||||
"description": "Create a sum using sigma notation",
|
||||
|
@ -260,34 +114,11 @@
|
|||
"description": "Create a ln call",
|
||||
"body": "\\ln($1)$0"
|
||||
},
|
||||
"Aligned": {
|
||||
"prefix": "aligned",
|
||||
"description": "Create an aligned environment",
|
||||
"body": [
|
||||
"\\begin{aligned}",
|
||||
"\t$0",
|
||||
"\\end{aligned}"
|
||||
]
|
||||
},
|
||||
"Let": {
|
||||
"prefix": "let",
|
||||
"description": "Let something equal something else",
|
||||
"body": "Let $$1 = $2$. $0"
|
||||
},
|
||||
"Force newline": {
|
||||
"prefix": "cr",
|
||||
"description": "Force newline in math mode",
|
||||
"body": "{\\ \\\\\\\\}"
|
||||
},
|
||||
"Aligned display math": {
|
||||
"prefix": "maligned",
|
||||
"description": "Create an aligned display math environment",
|
||||
"body": [
|
||||
"\\begin{align*}",
|
||||
"\t$0",
|
||||
"\\end{align*}"
|
||||
]
|
||||
},
|
||||
"System of equations": {
|
||||
"prefix": "eqsystem",
|
||||
"description": "Create a system of equations",
|
||||
|
@ -358,21 +189,5 @@
|
|||
"prefix": "integral",
|
||||
"description": "Integral",
|
||||
"body": "\\int $1 d${2:x}$0"
|
||||
},
|
||||
"Iff cases": {
|
||||
"prefix": "ciff",
|
||||
"description": "Prove an equivalence in both directions",
|
||||
"body": [
|
||||
"\\begin{enumerate}",
|
||||
"\t\\item[$\\implies$]$1",
|
||||
"\t\\item[$\\impliedby$]$2",
|
||||
"\\end{enumerate}",
|
||||
"$0"
|
||||
]
|
||||
},
|
||||
"quote": {
|
||||
"prefix": "quote",
|
||||
"description": "Quote a bunch of text",
|
||||
"body": "``$1''$0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue