fix whitespace in c/cpp snippets
This commit is contained in:
parent
d74c3f697b
commit
65a282c58d
@ -26,7 +26,7 @@ $0
|
||||
endsnippet
|
||||
|
||||
snippet main "main() (main)"
|
||||
int main (int argc, char const *argv[])
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
${0:/* code */}
|
||||
return 0;
|
||||
@ -34,7 +34,7 @@ int main (int argc, char const *argv[])
|
||||
endsnippet
|
||||
|
||||
snippet for "for int loop (fori)"
|
||||
for(size_t ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
|
||||
for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
|
||||
{
|
||||
${0:/* code */}
|
||||
}
|
||||
@ -76,7 +76,7 @@ fprintf(${1:stderr}, "${2:%s}\n"${2/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$3${2/([^%]|%
|
||||
endsnippet
|
||||
|
||||
snippet if "if .. (if)"
|
||||
if(${1:/* condition */})
|
||||
if (${1:/* condition */})
|
||||
{
|
||||
${0:/* code */}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ endsnippet
|
||||
|
||||
snippet readfile "read file (readF)"
|
||||
std::vector<char> v;
|
||||
if(FILE *fp = fopen(${1:"filename"}, "r"))
|
||||
if (FILE *fp = fopen(${1:"filename"}, "r"))
|
||||
{
|
||||
char buf[1024];
|
||||
while(size_t len = fread(buf, 1, sizeof(buf), fp))
|
||||
|
Loading…
Reference in New Issue
Block a user