diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-10-20 00:53:39 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-10-20 03:50:24 -0400 |
commit | 41413ffceab7fc9969c4d1fa77e2f44ac5b86a76 (patch) | |
tree | db5df27317b101a251b5d2c5fcb22850a9d03ee4 /vim/snippets/c.snippets | |
parent | 12148e261d83b96c25f440ea41c7633ca281b7b2 (diff) | |
download | conf-41413ffceab7fc9969c4d1fa77e2f44ac5b86a76.tar.gz conf-41413ffceab7fc9969c4d1fa77e2f44ac5b86a76.zip |
clean up snippets a bit
Diffstat (limited to 'vim/snippets/c.snippets')
-rw-r--r-- | vim/snippets/c.snippets | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/vim/snippets/c.snippets b/vim/snippets/c.snippets index 17df051..eece346 100644 --- a/vim/snippets/c.snippets +++ b/vim/snippets/c.snippets @@ -1,13 +1,12 @@ snippet guard - #ifndef ${1:`'_' . toupper(substitute(matchstr(expand("%"), '^.*/\zs.*\.h'), '[.-]', '_', 'g'))`} - #define $1 + #ifndef ${1:`'_' . toupper(substitute(matchstr(expand("%"), '^.*/\zs.*\.h'), '[.-]', '_', 'g'))`} + #define $1 - ${2} - - #endif + ${0} + #endif snippet main - int main(int argc, char *argv[]) - { - ${1} - } + int main(int argc, char *argv[]) + { + ${0} + } |