mirror of
https://github.com/gryf/snipmate.vim.git
synced 2025-12-19 20:38:05 +01:00
updated some C snippets
This commit is contained in:
@@ -12,10 +12,12 @@ snippet inc
|
||||
snippet Inc
|
||||
#include "${1:`Filename("$1.h")`}"${2}
|
||||
# #ifndef ... #define ... #endif
|
||||
snippet def
|
||||
snippet Def
|
||||
#ifndef $1
|
||||
#define ${1:SYMBOL} ${2:value}
|
||||
#endif${3}
|
||||
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)
|
||||
@@ -56,8 +58,8 @@ snippet for
|
||||
}
|
||||
# Custom For Loop
|
||||
snippet forr
|
||||
for (${1:i} = 0; ${2:$1 < 10}; $1${3:++}) {
|
||||
${4:/* code */}
|
||||
for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
|
||||
${5:/* code */}
|
||||
}
|
||||
# Function
|
||||
snippet fun
|
||||
|
||||
Reference in New Issue
Block a user