James Newton
James Newton

Reputation: 7082

Sublime Text set key binding for Tools > Babel > Babel Transform

I want to create a key binding in Sublime Text 3 for the command Tools > Babel > Babel Transform.

I have used the menu item Preferences > Key Bindings to open the user keymap, and I have added this line:

{ "keys": ["ctrl+shift+b"], "command": "babel_transform" },

However, pressing Ctrl-Shift-B has no effect. If I use a different command (such as "prompt_open_folder"), the key binding words correctly, so I assume that it is the "babel_transform" command which I have got wrong.

How should I write this keymap line correctly?

Upvotes: 1

Views: 93

Answers (1)

Idan
Idan

Reputation: 5450

The command for Babel Transform is babel therefore, this will work:

{ "keys": ["ctrl+shift+b"], "command": "babel" }

The way figure out a command is to:

  1. Open console and turn on logging of commands: sublime.log_commands(True)

  2. Then Tools > Babel > Babel Transform

  3. The output will be: command: babel

Upvotes: 2

Related Questions