Hi! pluskid is the specialist in this stuff, but I'll try to explain
the two distinct cases:
> str<TAB> recognizes str_getcsv as snippet key but
> str_<TAB> does not recognize anything.
I think you're mixing it up... "str<TAB>" will try to find snippets
for the "str" snippet *key*. Another thing is to say that you have the
"str_getcsv" snippet associated with the "str" key.
"str_" will work as a snippet *key* if you have some snippet keyed to
"str_", but it *won't* magically autocomplete to "str_getcsv".
YASnippet is a templating engine, not a completion engine. A very
nice, simple and language-agnostic completion system is bundled with
emacs and is called "hippie-expand". Try 'M-x hippie-expand'.
> str_get<TAB> recognizes only words begining with "get".
`yas/key-syntaxes' has many elements, right? Well, turns out the "word
chars" element of 'yas/key-syntaxes' has precedence over the "word and
punctuation chars" element. "_" being a punctuation char (non-word),
yasnippet won't search further since it already found valid,
expandible snippets for the snipept key "get".