Sublime Forum

Triggering Snippet with key combo

#1

Hi,

How do I trigger a snippet when I hit do a key combo. For example, when I hit “CTRL+D” I want it to show this chunk of text:

show hello world

print “hello world”

Thanks.

0 Likes

#2

Anyone? Had to rename the thread topic name to make it more clear. Any help is greatly appreciated.

Thanks!

0 Likes

#3

This one should work:

{ "keys": "ctrl+d"], "command": "insert_snippet", "args": {"contents": "# show hello world\nprint \"hello world\""} } 
0 Likes

#4

Thanks! This helped a lot.

0 Likes