In my Sublime Text 3, I use JsFormat to format my javascript source code. Its key binding follows:
1 2 3 4 |
{ "keys": ["ctrl+alt+i"], "command": "js_format", "context": [{"key": "selector", "operator": "equal", "operand": "source.js,source.json,source.html"}] } |
I have noticed that the JsFormat used the selector context operand to make sure that the js_format command would only run on file types “.js”, “.json” or “.html”. This is to avoid key clashes with other Continue reading...