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

一世执手 提交于 2021-01-28 13:00:45

问题


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:


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



来源:https://stackoverflow.com/questions/54763197/sublime-text-set-key-binding-for-tools-babel-babel-transform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!