For most users, there’s probably little difference between snippets or completions, both let you insert blocks of code with tab-stops. There is, however, one difference that I find rather substantial.
Take the trigger pre-word
for instance. When using completions, the trigger is working in fuzzy mode – I could type word
and the pre-word
would be among the suggestions in the completion popup. If it was a snippet, I would have to start with the letter p
(or, more intuitively, use the entire pre
prefix). I’m not aware of any other differences between snippets and completions, but to me this is rather substantial.
I have a package that comes with 6,000+ snippets. The reason I went with snippets is to avoid annoyed users, who would otherwise constantly get suggestions for completions as they type, and require them to take action to avoid this (e.g. pressing Escape.) This is especially true for documentation files, e.g. Markdown. On the other hand I’m worrying about maintainability of thousands of files (and, while possibly negligible, performance of reading and parsing thousands of files). While my mentioned package is quite mature at this point, I add new snippets every now and then, or change the behaviour of existing snippets with a search & replace in Sublime Text. The former would be easier when working with completions, since I could duplicate lines and make my changes. The latter is rather slow, since Sublime Text still performs poorly on thousands of files.
Anyway, to make a long story short, I was wondering Sublime Text offers a way to make use of the pros of completions (maintainability) and snippets (strict triggers).