D
D
Daniil Shevkunov2021-08-20 10:47:11
Sublime Text
Daniil Shevkunov, 2021-08-20 10:47:11

How to configure hotkeys for extensions that don't have default hotkeys?

Installed the Pretty JSON extension to format JSON code when I start formatting with the command
Ctrl + Shift + P -> Pretty JSON: FormatJSON
Everything works (yes, FormatJSON is merged)
But when I try to put it on a keyboard shortcut, it doesn’t work, I tried this:
{"keys" : ["ctrl+j"], "command": "Pretty_JSON:FormatJSON"}
in command tried to put:
Pretty_JSON:FormatJSON
Pretty_JSON:_FormatJSON
Pretty_JSON_FormatJSON
FormatJSON Tell me

how to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas V, 2021-08-24
@danila763

Here the point is that you are not correctly assigning commands to be executed on keyboard shortcuts. It looks like you copy-paste them from the command palette, but only their names are indicated there, in a human-friendly form. The commands themselves can be viewed, for example, on the plugin's github , in its description.
6124bb526b58c495724081.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question