Save/Deploy multiple files at once with MavensMate in Sublime Text 3

When editing multiple Apex classes using MavensMate in Sublime Text is it possible to save them all back to Salesforce in one MetadataContainer?

I’ve got an abstract base class and a controller that implements it plus a Visualforce page and component. Trying to refactor code between them all is leading to some tricky dependency loops.

E.g. I’m trying at add a new abstract base class. I can’t save the abstract base class as the dependant controller class doesn’t implement it yet.

I’ve tried selecting multiple .cls files in the folder view and right clicking. The MavensMate > Compile Selected Files option is disabled.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Yes, they have a command for compile_tabs that saves all open files to the server. I’d thought it was originally tied to super-shift-d but it no longer appears to be documented in their shortcuts list although it may still be active.

Personally, I didn’t like their default key binding since it overrides the default sublime text behavior of duplicating a line. You can fix that and add your own short cut key (super-shift-s felt like the most appropriate for save all), by appending the following to your user key bindings file.

    {  "keys": ["super+shift+d"], "command": "duplicate_line" },
    {  "keys": ["super+shift+s"], "command": "compile_tabs"},

The command can also be accessed via the Command Palette (ctrl+shift+P) then “MavensMate: Compile Tabs”

See also MavensMate Issue: Would like to save multiple open files

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x