[quote=“abathologist”]If I understand you correctly, you can just assign a keybinding to trigger the snippet. For example, I use the following snippet to wrap text with asterisks for Markdown:
[code]
[/code]
Then I set the following keybinding in my user keymap prefs:
{ "keys": "super+shift+i"], "command": "insert_snippet", "args": {"name": "Packages/User/md-ital.sublime-snippet" }}
Not only that you can also add snippets inline and add context.
[code]{ “keys”: “super+shift+i”], “command”: “insert_snippet”, “args”: {“contents”: “${SELECTION}” },
“context”:
{"key": "selector", "operator": "equal", "operand": "source.python", "match_all": true },
{"key": "selector", "operator": "not_equal", "operand": "comment", "match_all": false }
]
}[/code]
The equal means it works only in source.python the not_equal means exclude comment.blah scopes.