diff options
author | Yigit Sever | 2022-01-06 21:10:41 +0300 |
---|---|---|
committer | Yigit Sever | 2022-01-06 21:10:41 +0300 |
commit | 77c95fbb15af968d260f829f8e0c0c221fb56d56 (patch) | |
tree | 79e18e08dcf10e6480320fe4d39279cd2a72338e /.config/nvim | |
parent | 729f26862bc2ccc5f5fbc3cfc85537670f197fec (diff) | |
download | dotfiles-77c95fbb15af968d260f829f8e0c0c221fb56d56.tar.gz dotfiles-77c95fbb15af968d260f829f8e0c0c221fb56d56.tar.bz2 dotfiles-77c95fbb15af968d260f829f8e0c0c221fb56d56.zip |
nvim: new snippets
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/my_snippets/c.snippets | 12 | ||||
-rw-r--r-- | .config/nvim/my_snippets/tex.snippets | 5 |
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: | ||
2 | priority 100 | ||
3 | |||
4 | snippet if "if only" b | ||
5 | if (${1:true}) { | ||
6 | ${0:{VISUAL}} | ||
7 | } | ||
8 | endsnippet | ||
9 | |||
10 | snippet trace "printf trace baby" b | ||
11 | printf("TRACE: ${1} (`!v b:vista_nearest_method_or_function`:`!v line(".")`)\n"${2});$0 | ||
12 | endsnippet | ||
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 | |||
107 | endsnippet | 107 | endsnippet |
108 | 108 | ||
109 | context "math()" | 109 | context "math()" |
110 | snippet -> "auto rightarrow" wrA | ||
111 | \rightarrow | ||
112 | endsnippet | ||
113 | |||
114 | context "math()" | ||
110 | snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA | 115 | snippet '([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)`} |
112 | endsnippet | 117 | endsnippet |