Skyler Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 1 | # 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 Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 24 | # Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt |
| 25 | |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 26 | snippet latex "A latex block" w |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 27 | $${VISUAL}${1}$${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 28 | endsnippet |
| 29 | |
| 30 | snippet dydx "The derivative" i |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 31 | \frac{d${1:y}}{d${2:x}}${0} |
Skyler Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 32 | endsnippet |
| 33 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 34 | snippet derivative "The derivative" i |
| 35 | \frac{d${1:y}}{d${2:x}}${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 36 | endsnippet |
| 37 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 38 | snippet inti "Integrate indefinitely" i |
| 39 | \int ${1} \text{ d}${2:x}${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 40 | endsnippet |
| 41 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 42 | snippet intd "Integrate definitely" i |
Skyler Grey | e9e4585 | 2022-10-31 00:16:58 +0000 | [diff] [blame] | 43 | \int^{${1}}_{${2}}${3} \text{ d}${4:x}${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 44 | endsnippet |
| 45 | |
| 46 | snippet ihat "The I vector" i |
| 47 | \hat{\bm{i}} |
| 48 | endsnippet |
| 49 | |
| 50 | snippet jhat "The J vector" i |
| 51 | \hat{\bm{j}} |
| 52 | endsnippet |
| 53 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 54 | snippet vecbold "A vector" i |
| 55 | \bm{${1}}${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 56 | endsnippet |
| 57 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 58 | snippet veccol2 "A 2-tall column vector" i |
| 59 | \begin{pmatrix} ${1} \\\\ ${2} \end{pmatrix}${0} |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 60 | endsnippet |
| 61 | |
| 62 | snippet nl "A latex newline (e.g. for column vectors)" i |
| 63 | \\\\ |
| 64 | endsnippet |
| 65 | |
| 66 | snippet d2ydx2 "The second derivative" i |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 67 | \frac{d^2${1:y}}{d${2:x}^2}${0} |
Skyler Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 68 | endsnippet |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame] | 69 | |
| 70 | snippet nospell "Disable spellcheck on the visually-selected region" |
| 71 | <!-- spell-checker:disable --> |
| 72 | ${VISUAL} |
| 73 | <!-- spell-checker:enable --> |
| 74 | endsnippet |
Skyler Grey | 81f4af6 | 2022-10-31 00:10:52 +0000 | [diff] [blame] | 75 | |
Skyler Grey | 0c024ef | 2022-10-31 00:17:14 +0000 | [diff] [blame] | 76 | snippet spellwords "Add extra words for spellchecking" |
| 77 | <!-- spell-checker:words ${1} -->${0} |
| 78 | endsnippet |
| 79 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 80 | snippet normaldistribution "A normal distribution" i |
| 81 | X\sim N(${1:mean}, ${2:variance})${0} |
| 82 | endsnippet |
| 83 | |
Skyler Grey | fab867f | 2023-01-25 21:45:01 +0000 | [diff] [blame^] | 84 | snippet poissondistribution "A poisson distribution" i |
| 85 | X\sim \text{Po}(${1:\lambda})${0} |
| 86 | endsnippet |
| 87 | |
Skyler Grey | 3d1b450 | 2022-10-31 00:11:11 +0000 | [diff] [blame] | 88 | snippet 2x2matrix "A 2 by 2 matrix" i |
| 89 | \begin{bmatrix} ${1} & ${2} \\\\ ${3} & ${4} \end{bmatrix}${0} |
Skyler Grey | 81f4af6 | 2022-10-31 00:10:52 +0000 | [diff] [blame] | 90 | endsnippet |
Skyler Grey | e9e4585 | 2022-10-31 00:16:58 +0000 | [diff] [blame] | 91 | |
| 92 | snippet sum "A sum" i |
| 93 | \sum^{${1:n}}_{${2:r}=${3:1}}${4}${0} |
| 94 | endsnippet |
Skyler Grey | 0c024ef | 2022-10-31 00:17:14 +0000 | [diff] [blame] | 95 | |
| 96 | snippet qed "quod erat demonstrandum - the thing we wanted to prove has been" w |
| 97 | Q.E.D. |
| 98 | endsnippet |
| 99 | |
| 100 | snippet forallinzplus "For all in the positive integers" i |
| 101 | \forall ${1:n} \in \\${2:Z}^${3:+}${0} |
| 102 | endsnippet |
| 103 | |
| 104 | snippet piby "By by something" i |
| 105 | \frac{${1}\pi}{${2}}${0} |
| 106 | endsnippet |
Skyler Grey | 57c5061 | 2022-10-31 00:25:30 +0000 | [diff] [blame] | 107 | |
| 108 | snippet ne "Not equal to" i |
| 109 | \not = |
| 110 | endsnippet |
Skyler Grey | fab867f | 2023-01-25 21:45:01 +0000 | [diff] [blame^] | 111 | |
| 112 | snippet arsinh "Arsinh" i |
| 113 | \text{arsinh} |
| 114 | endsnippet |
| 115 | |
| 116 | snippet artanh "Artanh" i |
| 117 | \text{artanh} |
| 118 | endsnippet |
| 119 | |
| 120 | snippet arcosh "Arcosh" i |
| 121 | \text{arcosh} |
| 122 | endsnippet |