I did see:
- Sublime text: how to add a key binding to hex_viewer package command
- Sublime Text set key binding for Tools > Babel > Babel Transform
I have installed JSON Reindent in my Sublime (3.2.2 Build 3211). To reindent a JSON I press Ctrl+Shift+P
type in JSON Reindent
in command pallet and press enter.
I would like to bind a key combo say Ctrl+Shift+J
to JSON Reindent command. I already have my own Default (Linux).sublime-keymap
in the right place with a lot of overrides. But I'm unable to find command name.
This functionality is brought in by a plugin so command won't be available here. I tried to:
- bind
indent
andreindent
, no luck - bind
json_reindent
,JSON_Reindent
andJSON Reindent
, no luck - enable command logging via
sublime.log_commands(True)
in cosole, then didCtrl+A
(select all)Ctrl+Shift+P
- type in
JSON Reindent
in command pallet - press
Enter
It printed following in console (nothing for JSON reindent).
>>> sublime.log_commands(True)
command: move_to {"extend": true, "to": "eol"}
command: select_all
command: show_overlay {"overlay": "command_palette"}
What do I put for command
to bind a plugin's command in my Default (Linux).sublime-keymap
?
{ "keys": ["ctrl+shift+j"], "command": "?????" },