jtsternberg/Sublime-Snippets — pull request #1 by GaryJones (2014-09-15 13:59:14+00:00)
Title: Snippet sources

This PR adds scopes to a few of the snippets I've half-inched from you :see_no_evil: The advantage of scopes, is that you can specify when the trigger word is appropriate for the current context or not.

As a simple example, the `$min=` trigger is only suitable when inside a typical bit of PHP. It's not suitable for inside strings, or inside JS or SCSS source, both where `$min=` could be used.

By being really specific though, you can have the same trigger for different contexts, which means fewer triggers to have to remember. For example, compare my versions (which have changed triggers) for:

* [standard `__()`](https://github.com/GaryJones/sublime/blob/master/Packages/User/__.sublime-snippet), and
* [`__()` which breaks out of single quotes](https://github.com/GaryJones/sublime/blob/master/Packages/User/__-single.sublime-snippet).

The first is limited to PHP source which isn't a string, and the second is only for inside single quoted strings inside PHP (not JS, not double-quoted strings etc.). Different contexts means I can use `__` as the trigger for both of them, and since that's the start (whole) of the function name being used, it makes more sense to me (and is shorter) than some variants of `i18n`. Obviously, for the PRs, I've not changed the triggers that you're used to.

Descriptions and placeholders also added / updated for slightly more usefulness. Descriptions are used in the autocomplete pop-up.