De-noise c pre-processor snippets

This commit is contained in:
Kenneth Benzie 2016-11-04 22:23:00 +00:00
parent 23b7aeb64d
commit 11b71bc1e0

View File

@ -57,19 +57,19 @@ endsnippet
snippet #ifndef "Guarded macro definition" snippet #ifndef "Guarded macro definition"
#ifndef ${1/([A-Za-z0-9_]+).*/$1/} #ifndef ${1/([A-Za-z0-9_]+).*/$1/}
#define ${1:SYMBOL} ${0:VALUE} #define ${1:SYMBOL} ${0:VALUE}
#endif // ${1/([A-Za-z0-9_]+).*/$1/} #endif
endsnippet endsnippet
snippet #if "#if block" snippet #if "#if block"
#if ${1:SYMBOL} #if ${1:SYMBOL}
$0 $0
#endif // ${1/([A-Za-z0-9_]+).*/$1/} #endif
endsnippet endsnippet
snippet #ifdef "#if defined(...) block" snippet #ifdef "#if defined(...) block"
#if defined(${1:SYMBOL}) #ifdef ${1:SYMBOL}
$0 $0
#endif // $1 #endif
endsnippet endsnippet
snippet once "Include guard" snippet once "Include guard"
@ -116,7 +116,7 @@ else if (${1:condition}) {
} }
endsnippet endsnippet
snippet for "For loop, index or range" snippet for "For loop"
for (${1:int} ${2:index} = ${3:0}; $2 ${4:<} ${5:count}; $2${6:++}) { for (${1:int} ${2:index} = ${3:0}; $2 ${4:<} ${5:count}; $2${6:++}) {
$0 $0
} }