Sublime Forum

Can't make save_all to work in a macro

#1

HI,

I’m new to this forum, I’m maintaining the Haxe Sublime Text bundle :
github.com/clemos/haxe-sublime2-bundle

I want to save all files before compiling, but I have a problem getting the “save_all” command to work in a macro.

When binding “save_all” to, say, Ctrl+Shift+S in Default.sublime-keymap, the command works as expected.

Now if I add the command to a macro, for example here :
github.com/clemos/haxe-sublime2 … lime-macro
{ “command” : “save_all” }, { “command” : “haxe_run_build” }
The console will say:
Unknown macro command save_all

For now, I managed to run “save_all” from the plugin (.py) itself before compilation:
github.com/clemos/haxe-sublime2 … te.py#L368
But this way it’s kind of “hard coded”,
I’d very much prefer this “save_all and build” command to be implemented as a macro.
How is it possible ?

Thanks for providing this amazing text editor anyway :smile:
Regards,
Clément

0 Likes