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
|
snippet Inc
|
||||||
#include "${1:`Filename("$1.h")`}"${2}
|
#include "${1:`Filename("$1.h")`}"${2}
|
||||||
# #ifndef ... #define ... #endif
|
# #ifndef ... #define ... #endif
|
||||||
snippet def
|
snippet Def
|
||||||
#ifndef $1
|
#ifndef $1
|
||||||
#define ${1:SYMBOL} ${2:value}
|
#define ${1:SYMBOL} ${2:value}
|
||||||
#endif${3}
|
#endif${3}
|
||||||
|
snippet def
|
||||||
|
#define
|
||||||
# Header Include-Guard
|
# Header Include-Guard
|
||||||
# (the randomizer code is taken directly from TextMate; it could probably be
|
# (the randomizer code is taken directly from TextMate; it could probably be
|
||||||
# cleaner, I don't know how to do it in vim script)
|
# cleaner, I don't know how to do it in vim script)
|
||||||
@@ -56,8 +58,8 @@ snippet for
|
|||||||
}
|
}
|
||||||
# Custom For Loop
|
# Custom For Loop
|
||||||
snippet forr
|
snippet forr
|
||||||
for (${1:i} = 0; ${2:$1 < 10}; $1${3:++}) {
|
for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
|
||||||
${4:/* code */}
|
${5:/* code */}
|
||||||
}
|
}
|
||||||
# Function
|
# Function
|
||||||
snippet fun
|
snippet fun
|
||||||
|
|||||||
Reference in New Issue
Block a user