blob: f30c2c7369454171db10e8d876be4150b5d2ae4f [file] [log] [blame]
Skyler Greyba17b652022-09-09 14:22:54 +01001# A valid snippet should starts with:
2#
3# snippet trigger_word [ "description" [ options ] ]
4#
5# and end with:
6#
7# endsnippet
8#
9# Snippet options:
10#
11# b - Beginning of line.
12# i - In-word expansion.
13# w - Word boundary.
14# r - Regular expression
15# e - Custom context snippet
16# A - Snippet will be triggered automatically, when condition matches.
17#
18# Basic example:
19#
20# snippet emitter "emitter properties" b
21# private readonly ${1} = new Emitter<$2>()
22# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
23# endsnippet
Skyler Greyba17b652022-09-09 14:22:54 +010024# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
25
Skyler Grey3ca577e2022-10-30 23:25:51 +000026snippet latex "A latex block" w
Skyler Grey3d1b4502022-10-31 00:11:11 +000027$${VISUAL}${1}$${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000028endsnippet
29
30snippet dydx "The derivative" i
Skyler Grey3d1b4502022-10-31 00:11:11 +000031\frac{d${1:y}}{d${2:x}}${0}
Skyler Greyba17b652022-09-09 14:22:54 +010032endsnippet
33
Skyler Grey3d1b4502022-10-31 00:11:11 +000034snippet derivative "The derivative" i
35\frac{d${1:y}}{d${2:x}}${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000036endsnippet
37
Skyler Grey3d1b4502022-10-31 00:11:11 +000038snippet inti "Integrate indefinitely" i
39\int ${1} \text{ d}${2:x}${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000040endsnippet
41
Skyler Grey3d1b4502022-10-31 00:11:11 +000042snippet intd "Integrate definitely" i
Skyler Greye9e45852022-10-31 00:16:58 +000043\int^{${1}}_{${2}}${3} \text{ d}${4:x}${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000044endsnippet
45
46snippet ihat "The I vector" i
47\hat{\bm{i}}
48endsnippet
49
50snippet jhat "The J vector" i
51\hat{\bm{j}}
52endsnippet
53
Skyler Grey3d1b4502022-10-31 00:11:11 +000054snippet vecbold "A vector" i
55\bm{${1}}${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000056endsnippet
57
Skyler Grey3d1b4502022-10-31 00:11:11 +000058snippet veccol2 "A 2-tall column vector" i
59\begin{pmatrix} ${1} \\\\ ${2} \end{pmatrix}${0}
Skyler Grey3ca577e2022-10-30 23:25:51 +000060endsnippet
61
62snippet nl "A latex newline (e.g. for column vectors)" i
63\\\\
64endsnippet
65
66snippet d2ydx2 "The second derivative" i
Skyler Grey3d1b4502022-10-31 00:11:11 +000067\frac{d^2${1:y}}{d${2:x}^2}${0}
Skyler Greyba17b652022-09-09 14:22:54 +010068endsnippet
Skyler Grey3ca577e2022-10-30 23:25:51 +000069
70snippet nospell "Disable spellcheck on the visually-selected region"
71<!-- spell-checker:disable -->
72${VISUAL}
73<!-- spell-checker:enable -->
74endsnippet
Skyler Grey81f4af62022-10-31 00:10:52 +000075
Skyler Grey0c024ef2022-10-31 00:17:14 +000076snippet spellwords "Add extra words for spellchecking"
77<!-- spell-checker:words ${1} -->${0}
78endsnippet
79
Skyler Grey3d1b4502022-10-31 00:11:11 +000080snippet normaldistribution "A normal distribution" i
81X\sim N(${1:mean}, ${2:variance})${0}
82endsnippet
83
Skyler Greyfab867f2023-01-25 21:45:01 +000084snippet poissondistribution "A poisson distribution" i
85X\sim \text{Po}(${1:\lambda})${0}
86endsnippet
87
Skyler Grey3d1b4502022-10-31 00:11:11 +000088snippet 2x2matrix "A 2 by 2 matrix" i
89\begin{bmatrix} ${1} & ${2} \\\\ ${3} & ${4} \end{bmatrix}${0}
Skyler Grey81f4af62022-10-31 00:10:52 +000090endsnippet
Skyler Greye9e45852022-10-31 00:16:58 +000091
92snippet sum "A sum" i
93\sum^{${1:n}}_{${2:r}=${3:1}}${4}${0}
94endsnippet
Skyler Grey0c024ef2022-10-31 00:17:14 +000095
96snippet qed "quod erat demonstrandum - the thing we wanted to prove has been" w
97Q.E.D.
98endsnippet
99
100snippet forallinzplus "For all in the positive integers" i
101\forall ${1:n} \in \\${2:Z}^${3:+}${0}
102endsnippet
103
104snippet piby "By by something" i
105\frac{${1}\pi}{${2}}${0}
106endsnippet
Skyler Grey57c50612022-10-31 00:25:30 +0000107
108snippet ne "Not equal to" i
109\not =
110endsnippet
Skyler Greyfab867f2023-01-25 21:45:01 +0000111
112snippet arsinh "Arsinh" i
113\text{arsinh}
114endsnippet
115
116snippet artanh "Artanh" i
117\text{artanh}
118endsnippet
119
120snippet arcosh "Arcosh" i
121\text{arcosh}
122endsnippet