I am working on setting up my own keymaps and was wondering if there is the option to set keys to switch the file type that is being worked on. So for example, if I have a regular plain text file and want it to be a css file, I would have a keymap that would change the document type to css. Possible? If so, please explain to me how you have done this.
Rob
The keybinding for this would be:
{
"keys": ["YOUR_SEQUENCE"],
"command": "set_file_type",
"args": {"syntax": "Packages/CSS/CSS.tmLanguage"}
}
How to discover command names:
sublime.log_commands(True)Set Syntax: CSSThe name of the command and it's required arguments should be logged to the console. From there you just put it in the right JSON syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With