Improvements to c.snippets by melko.

This commit is contained in:
Holger Rapp 2013-02-20 09:45:37 +01:00
parent 831b3460ca
commit 7be6694232
2 changed files with 22 additions and 2 deletions

View File

@ -43,8 +43,15 @@ int main(int argc, char const *argv[])
}
endsnippet
snippet for "for int loop (fori)"
for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
snippet for "for loop (for)"
for (${2:i} = 0; $2 < ${1:count}; ${3:++$2})
{
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
}
endsnippet
snippet fori "for int loop (fori)"
for (${4:int} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
{
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
}
@ -75,6 +82,12 @@ snippet td "Typedef"
typedef ${1:int} ${2:MyCustomType};
endsnippet
snippet wh "while loop"
while(${1:/* condition */}) {
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
}
endsnippet
snippet do "do...while loop (do)"
do {
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
@ -92,6 +105,12 @@ if (${1:/* condition */})
}
endsnippet
snippet el "else .. (else)"
else {
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
}
endsnippet
snippet ife "if .. else (ife)"
if (${1:/* condition */})
{

View File

@ -1334,6 +1334,7 @@ Contributors listed in chronological order:
David Brown (Nali4Freedom)
Harry Xu (harryxu)
Tom Cammann (takac)
melko
Thank you for your support.