1
votes

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?

1

1 Answers

2
votes

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