summaryrefslogtreecommitdiffstats
path: root/.config/nvim/my_snippets
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/my_snippets')
-rw-r--r--.config/nvim/my_snippets/c.snippets12
-rw-r--r--.config/nvim/my_snippets/tex.snippets5
2 files changed, 17 insertions, 0 deletions
diff --git a/.config/nvim/my_snippets/c.snippets b/.config/nvim/my_snippets/c.snippets
new file mode 100644
index 0000000..d4522f2
--- /dev/null
+++ b/.config/nvim/my_snippets/c.snippets
@@ -0,0 +1,12 @@
1# vim:ft=snippets:
2priority 100
3
4snippet if "if only" b
5if (${1:true}) {
6 ${0:{VISUAL}}
7}
8endsnippet
9
10snippet trace "printf trace baby" b
11printf("TRACE: ${1} (`!v b:vista_nearest_method_or_function`:`!v line(".")`)\n"${2});$0
12endsnippet
diff --git a/.config/nvim/my_snippets/tex.snippets b/.config/nvim/my_snippets/tex.snippets
index f81ad94..9941420 100644
--- a/.config/nvim/my_snippets/tex.snippets
+++ b/.config/nvim/my_snippets/tex.snippets
@@ -107,6 +107,11 @@ snippet '([A-Za-z])(\d)' "auto subscript" wrA
107endsnippet 107endsnippet
108 108
109context "math()" 109context "math()"
110snippet -> "auto rightarrow" wrA
111\rightarrow
112endsnippet
113
114context "math()"
110snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA 115snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA
111`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`} 116`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`}
112endsnippet 117endsnippet