diff --git a/extras/imported/c-mode/Declarations/struct.yasnippet b/extras/imported/c-mode/Declarations/struct.yasnippet index 41a84d3..73ee7a9 100644 --- a/extras/imported/c-mode/Declarations/struct.yasnippet +++ b/extras/imported/c-mode/Declarations/struct.yasnippet @@ -3,7 +3,7 @@ # contributor: Translated from TextMate Snippet # 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)} }; \ No newline at end of file diff --git a/extras/imported/c-mode/Idioms/010 main() (main).yasnippet b/extras/imported/c-mode/Idioms/010 main() (main).yasnippet index 8908f59..78efdfb 100644 --- a/extras/imported/c-mode/Idioms/010 main() (main).yasnippet +++ b/extras/imported/c-mode/Idioms/010 main() (main).yasnippet @@ -5,6 +5,6 @@ # -- 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; } \ No newline at end of file