Here is a key binding example that I use for the Markdown Preview plugin
{ "keys": ["ctrl+b"], "command": "markdown_preview", "args": {"target": "browser"}, "context": [{ "key": "selector", "operator": "equal", "operand": "text.html.markdown" }] },
As you can see, I use the ctrl+b key, which is usually attached to the build command, but it is only active when my cursor is in "text.html.markdown", which occurs only in markup files. Therefore, ctrl+b is created as usual when i'm in a different type of file.
This area is usually in the form of "text.html ..." or "source.python ...". To find the current region name of your cursor, use the command "show_scope_name" with ctrl+alt+shift+p .
Related Documentation
source share