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
|
endsnippet
|
||||||
|
|
||||||
snippet for "for int loop (fori)"
|
snippet for "for loop (for)"
|
||||||
for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
|
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 *\/)/}}
|
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
|
||||||
}
|
}
|
||||||
@ -75,6 +82,12 @@ snippet td "Typedef"
|
|||||||
typedef ${1:int} ${2:MyCustomType};
|
typedef ${1:int} ${2:MyCustomType};
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet wh "while loop"
|
||||||
|
while(${1:/* condition */}) {
|
||||||
|
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet do "do...while loop (do)"
|
snippet do "do...while loop (do)"
|
||||||
do {
|
do {
|
||||||
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
|
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
|
||||||
@ -92,6 +105,12 @@ if (${1:/* condition */})
|
|||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet el "else .. (else)"
|
||||||
|
else {
|
||||||
|
${VISUAL}${0:${VISUAL/(.*)/(?1::\/* code *\/)/}}
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet ife "if .. else (ife)"
|
snippet ife "if .. else (ife)"
|
||||||
if (${1:/* condition */})
|
if (${1:/* condition */})
|
||||||
{
|
{
|
||||||
|
@ -1334,6 +1334,7 @@ Contributors listed in chronological order:
|
|||||||
David Brown (Nali4Freedom)
|
David Brown (Nali4Freedom)
|
||||||
Harry Xu (harryxu)
|
Harry Xu (harryxu)
|
||||||
Tom Cammann (takac)
|
Tom Cammann (takac)
|
||||||
|
melko
|
||||||
|
|
||||||
Thank you for your support.
|
Thank you for your support.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user