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 |
| 27 | $${0}$ |
| 28 | endsnippet |
| 29 | |
| 30 | snippet dydx "The derivative" i |
Skyler Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 31 | \frac{dy}{dx} |
| 32 | endsnippet |
| 33 | |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame^] | 34 | snippet dydt "The derivative of `y` WRT `t`" i |
| 35 | \frac{dy}{dx} |
| 36 | endsnippet |
| 37 | |
| 38 | snippet dydx "The derivative of `x` WRT `t`" i |
| 39 | \frac{dy}{dx} |
| 40 | endsnippet |
| 41 | |
| 42 | snippet iidx "Integrate indefinitely with respect to x" i |
| 43 | \int ${0} \text{ d}x |
| 44 | endsnippet |
| 45 | |
| 46 | snippet idx "Integrate definitely with respect to x" i |
| 47 | \int{${0}}{${1}}${2} \text{ d}x |
| 48 | endsnippet |
| 49 | |
| 50 | snippet ihat "The I vector" i |
| 51 | \hat{\bm{i}} |
| 52 | endsnippet |
| 53 | |
| 54 | snippet jhat "The J vector" i |
| 55 | \hat{\bm{j}} |
| 56 | endsnippet |
| 57 | |
| 58 | snippet vec "A vector" i |
| 59 | \bm{${0}} |
| 60 | endsnippet |
| 61 | |
| 62 | snippet col "A column vector" i |
| 63 | \begin{bmatrix}${0}\end{bmatrix} |
| 64 | endsnippet |
| 65 | |
| 66 | snippet nl "A latex newline (e.g. for column vectors)" i |
| 67 | \\\\ |
| 68 | endsnippet |
| 69 | |
| 70 | snippet d2ydx2 "The second derivative" i |
Skyler Grey | ba17b65 | 2022-09-09 14:22:54 +0100 | [diff] [blame] | 71 | \frac{d^2y}{dx^2} |
| 72 | endsnippet |
Skyler Grey | 3ca577e | 2022-10-30 23:25:51 +0000 | [diff] [blame^] | 73 | |
| 74 | snippet nospell "Disable spellcheck on the visually-selected region" |
| 75 | <!-- spell-checker:disable --> |
| 76 | ${VISUAL} |
| 77 | <!-- spell-checker:enable --> |
| 78 | endsnippet |