summaryrefslogtreecommitdiffstats
path: root/vim/snippets
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-06-03 23:06:44 -0500
committerJesse Luehrs <doy@tozt.net>2009-06-03 23:06:44 -0500
commit685290ad46795b1e9e10049b7cdcb3faa6e0d8e6 (patch)
tree1c77bde7bd60dcbad6328e82378d055d1ca6dc00 /vim/snippets
parentb9556910637e131381b1e59d31e636534e72b9ac (diff)
downloadconf-685290ad46795b1e9e10049b7cdcb3faa6e0d8e6.tar.gz
conf-685290ad46795b1e9e10049b7cdcb3faa6e0d8e6.zip
better include guard snippet
Diffstat (limited to 'vim/snippets')
-rw-r--r--vim/snippets/c.snippets7
1 files changed, 2 insertions, 5 deletions
diff --git a/vim/snippets/c.snippets b/vim/snippets/c.snippets
index eca00d7..e208ede 100644
--- a/vim/snippets/c.snippets
+++ b/vim/snippets/c.snippets
@@ -19,16 +19,13 @@ snippet Def
snippet def
#define
# Header Include-Guard
-# (the randomizer code is taken directly from TextMate; it could probably be
-# cleaner, I don't know how to do it in vim script)
snippet once
- #ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`}
-
+ #ifndef ${1:`toupper(Filename('', 'UNTITLED').'_H')`}
#define $1
${2}
- #endif /* end of include guard: $1 */
+ #endif
# If Condition
snippet if
if (${1:/* condition */}) {