Improvements to c.snippets by melko.
This commit is contained in:
parent
831b3460ca
commit
7be6694232
@ -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 */})
|
||||
{
|
||||
|
@ -1334,6 +1334,7 @@ Contributors listed in chronological order:
|
||||
David Brown (Nali4Freedom)
|
||||
Harry Xu (harryxu)
|
||||
Tom Cammann (takac)
|
||||
melko
|
||||
|
||||
Thank you for your support.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user