Sublime Forum

Keyboard Shortcuts for Menu Commands

#1

Is it possible to set my own keyboard shortcut for a Menu Command that does not already have one? The Tools->Snippets command for example?

Grateful for any help.

Amitava

0 Likes

#2

If you mean shortcut like keymap (ex: ctrl+alt+shift+s), you have to put your shortcut in the Sublime Text 2\Packages\User\Default (‘OS’).sublime-keymap file and trigger this command:

{ "keys": "ctrl+alt+shift+s"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Snippet: "} }

The command come from Sublime Text 2\Packages\Default\Main.sublime-menu, search for Snippets…

The shortcut is automatically displayed in the menu next to the item.

0 Likes