Is it possible to set the syntax of the current (possibly unsaved) buffer from within a macro? I’ve looked at the existing macros in my Packages folder but I couldn’t find a command to do this. I looked for something like
{
"command": "set_syntax",
"args": {"syntax_name": "XML"}
}
but I could not find anything.
I need to be able to:
- Ctrl+N to open a new buffer
- Paste some text
- Hit a shortcut that sets a predefined syntax and runs a macro on the contents