blob: f30c2c7369454171db10e8d876be4150b5d2ae4f [file] [log] [blame]
# A valid snippet should starts with:
#
# snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
# endsnippet
#
# Snippet options:
#
# b - Beginning of line.
# i - In-word expansion.
# w - Word boundary.
# r - Regular expression
# e - Custom context snippet
# A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
# snippet emitter "emitter properties" b
# private readonly ${1} = new Emitter<$2>()
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
# endsnippet
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
snippet latex "A latex block" w
$${VISUAL}${1}$${0}
endsnippet
snippet dydx "The derivative" i
\frac{d${1:y}}{d${2:x}}${0}
endsnippet
snippet derivative "The derivative" i
\frac{d${1:y}}{d${2:x}}${0}
endsnippet
snippet inti "Integrate indefinitely" i
\int ${1} \text{ d}${2:x}${0}
endsnippet
snippet intd "Integrate definitely" i
\int^{${1}}_{${2}}${3} \text{ d}${4:x}${0}
endsnippet
snippet ihat "The I vector" i
\hat{\bm{i}}
endsnippet
snippet jhat "The J vector" i
\hat{\bm{j}}
endsnippet
snippet vecbold "A vector" i
\bm{${1}}${0}
endsnippet
snippet veccol2 "A 2-tall column vector" i
\begin{pmatrix} ${1} \\\\ ${2} \end{pmatrix}${0}
endsnippet
snippet nl "A latex newline (e.g. for column vectors)" i
\\\\
endsnippet
snippet d2ydx2 "The second derivative" i
\frac{d^2${1:y}}{d${2:x}^2}${0}
endsnippet
snippet nospell "Disable spellcheck on the visually-selected region"
<!-- spell-checker:disable -->
${VISUAL}
<!-- spell-checker:enable -->
endsnippet
snippet spellwords "Add extra words for spellchecking"
<!-- spell-checker:words ${1} -->${0}
endsnippet
snippet normaldistribution "A normal distribution" i
X\sim N(${1:mean}, ${2:variance})${0}
endsnippet
snippet poissondistribution "A poisson distribution" i
X\sim \text{Po}(${1:\lambda})${0}
endsnippet
snippet 2x2matrix "A 2 by 2 matrix" i
\begin{bmatrix} ${1} & ${2} \\\\ ${3} & ${4} \end{bmatrix}${0}
endsnippet
snippet sum "A sum" i
\sum^{${1:n}}_{${2:r}=${3:1}}${4}${0}
endsnippet
snippet qed "quod erat demonstrandum - the thing we wanted to prove has been" w
Q.E.D.
endsnippet
snippet forallinzplus "For all in the positive integers" i
\forall ${1:n} \in \\${2:Z}^${3:+}${0}
endsnippet
snippet piby "By by something" i
\frac{${1}\pi}{${2}}${0}
endsnippet
snippet ne "Not equal to" i
\not =
endsnippet
snippet arsinh "Arsinh" i
\text{arsinh}
endsnippet
snippet artanh "Artanh" i
\text{artanh}
endsnippet
snippet arcosh "Arcosh" i
\text{arcosh}
endsnippet