Sublime Forum

How to trigger a snippet by name via key command?

#1

I know how to make snippets, and I know how to set up a key command, but up until this point all I ever did combining the 2 is to pass the actual snippet as an arg in the command, as in:

"keys": "ctrl+shift+enter"], "command": "insert_snippet", "args": {"contents": "<br />"}

But what if I have a larger snippet like “My Snippet.sublime-snippet” and all I want to do is trigger it via the command (instead of putting the snippet in there as above. What’s the syntax?

0 Likes