aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarvin Borner2022-08-29 22:09:59 +0200
committerMarvin Borner2022-08-29 23:04:52 +0200
commit78fc68e8718e2e5afffb10c389d2d58bbd3e0681 (patch)
tree3c1076824c25882e6a9e305e39c148cc54e9520f
parent627afd9bb206765699f3420a6ab0847e636550b4 (diff)
Added snippets
-rw-r--r--editors/vim/README.md8
-rw-r--r--editors/vim/bruijn.snippets213
2 files changed, 221 insertions, 0 deletions
diff --git a/editors/vim/README.md b/editors/vim/README.md
index 1b254ef..c10e69d 100644
--- a/editors/vim/README.md
+++ b/editors/vim/README.md
@@ -15,3 +15,11 @@ In this example using vim-plug (others should work similarly):
1. Add `Plug 'marvinborner/bruijn', { 'rtp': 'editors/vim' }` to your
`.vimrc`
2. Run `:PlugInstall`
+
+# Snippets
+
+Snippets requires UltiSnips or a similar (compatible) alternative. You
+can then install the snippets using something like this (depends on your
+path setup):
+
+ ln -s $PWD/bruijn.snippets $HOME/.vim/plugged/vim-snippets/UltiSnips/bruijn.snippets
diff --git a/editors/vim/bruijn.snippets b/editors/vim/bruijn.snippets
new file mode 100644
index 0000000..35b94cf
--- /dev/null
+++ b/editors/vim/bruijn.snippets
@@ -0,0 +1,213 @@
+priority 0
+
+# === Definition snippets ===
+
+snippet "(.+)>" "prefix" r
+`!p snip.rv = match.group(1)`‣ $0
+endsnippet
+
+snippet "(.*)\." "mixfix" r
+`!p snip.rv = match.group(1)`…$0
+endsnippet
+
+# === Greek letters ===
+
+snippet Alpha
+endsnippet
+
+snippet alpha
+endsnippet
+
+snippet Beta
+endsnippet
+
+snippet beta
+endsnippet
+
+snippet Gamma
+endsnippet
+
+snippet gamma
+endsnippet
+
+snippet Delta
+endsnippet
+
+snippet delta
+endsnippet
+
+snippet Epsilon
+endsnippet
+
+snippet epsilon
+endsnippet
+
+snippet varepsilon
+endsnippet
+
+snippet Zeta
+endsnippet
+
+snippet zeta
+endsnippet
+
+snippet Eta
+endsnippet
+
+snippet eta
+endsnippet
+
+snippet Theta
+endsnippet
+
+snippet theta
+endsnippet
+
+snippet Iota
+endsnippet
+
+snippet iota
+endsnippet
+
+snippet Kappa
+endsnippet
+
+snippet kappa
+endsnippet
+
+snippet Lambda
+endsnippet
+
+snippet lambda
+endsnippet
+
+snippet Mu
+endsnippet
+
+snippet mu
+endsnippet
+
+snippet Nu
+endsnippet
+
+snippet nu
+endsnippet
+
+snippet Xi
+endsnippet
+
+snippet xi
+endsnippet
+
+snippet Omicron
+endsnippet
+
+snippet omicron
+ο
+endsnippet
+
+snippet Pi
+endsnippet
+
+snippet pi
+endsnippet
+
+snippet Rho
+endsnippet
+
+snippet rho
+endsnippet
+
+snippet Sigma
+endsnippet
+
+snippet sigma
+endsnippet
+
+snippet Tau
+endsnippet
+
+snippet tau
+endsnippet
+
+snippet Upsilon
+endsnippet
+
+snippet upsilon
+endsnippet
+
+snippet Phi
+endsnippet
+
+snippet phi
+endsnippet
+
+snippet varphi
+endsnippet
+
+snippet Chi
+endsnippet
+
+snippet chi
+endsnippet
+
+snippet Psi
+endsnippet
+
+snippet psi
+endsnippet
+
+snippet Omega
+endsnippet
+
+snippet omega
+endsnippet