improving C snip -- abbr has more info

This commit is contained in:
ujihisa 2012-10-13 18:11:05 -07:00
parent d7d40d66f4
commit 030e98deda
2 changed files with 13 additions and 3 deletions

View File

@ -73,7 +73,7 @@ abbr enum {}
${0} ${0}
}; };
# main function. # hard-tab is necessary; C indent doesn't support this.
snippet main snippet main
int main(int argc, char const* argv[]) int main(int argc, char const* argv[])
{ {
@ -119,10 +119,12 @@ snippet typedef
typedef ${1:base_type} ${2:custom_type}; typedef ${1:base_type} ${2:custom_type};
snippet printf snippet printf
printf("${1}\n"${2});${0} abbr printf("...\n", ...);
printf("${1}\n", ${2});
snippet fprintf snippet fprintf
fprintf(${1:stderr}, "${2}\n"${3});${0} abbr fprintf(..., "...\n", ...);
fprintf(${1:stderr}, "${2}\n"${3});
snippet comment snippet comment
alias /* alias /*
@ -133,3 +135,10 @@ snippet sizeof
alias size alias size
sizeof(${0}) sizeof(${0})
snippet helloworld
#include <stdio.h>
int main(int argc, char const* argv[])
{
puts("hello, world!");
return 0;
}

View File

@ -411,6 +411,7 @@ CHANGELOG *neosnippet-changelog*
2012-10-07 2012-10-07
- Improved vim snip. - Improved vim snip.
- Improved c snip.
2012-10-06 2012-10-06
- Improved indent snippet behavior. - Improved indent snippet behavior.