little change to the c snippets

This commit is contained in:
capitaomorte 2010-03-15 17:27:29 +00:00
parent 55e431ca99
commit 2d60ccbbd0
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# contributor: Translated from TextMate Snippet # contributor: Translated from TextMate Snippet
# name: Struct # name: Struct
# -- # --
struct ${1:${TM_FILENAME/(.+)\..+|.*/(?1:\L$1_t:name)/}} struct ${1:`(or (and buffer-file-name (file-name-sans-extension (file-name-nondirectory buffer-file-name))) "name")`}
{ {
${0:/* data */} ${2:/* data */$(yas/ephemeral-field 2)}
}; };

View File

@ -5,6 +5,6 @@
# -- # --
int main (int argc, char const *argv[]) int main (int argc, char const *argv[])
{ {
${1:/* code */$(when yas/modified-p (yas/exit-snippet (first (yas/snippets-at-point))) (yas/field-value 1))}$0 ${1:/* code */$(yas/ephemeral-field 1)}$0
return 0; return 0;
} }