Home Download Buy Blog Forum Support

Build System enhancements

Build System enhancements

Postby bizoo on Fri Mar 01, 2013 8:19 am

My requests for some enhancements in the Build System, some of them was already asked long time ago:

- Add an argument in the .sublime-build to set the height of the panel (in percent of window height). In addition an API to change the height of panel would be great.
- Add a "name" argument for the default build, not only the variants. It will be used in place of "Build: Build". This argument is already used by build system defined in project, but I don't think it's an issue.
- Remove "Build: Cancel" from Command Palette when not needed (like the corresponding item in the main menu)
- Add an argument "show_panel_on_build" in the .sublime-build, to override the global settings.

In addition:
- Add an argument "show_panel_on_build_only_on_error" in the .sublime-build to only show the panel when there's an error (using "line_regex" or maybe the exit code).
- If a build command without a variant name is triggered and the .sublime-build don't have a default build, automatically open the Command Palette with "Build:" (currently it trigger an error cos "cmd" is empty). Useful when you have many build variants without any one that is default (like running a SQL script on a database, you have 10 different database (variants) and want to always choose the one you want when running build):
Code: Select all
execmod = __import__("exec")

class ExecCommand(execmod.ExecCommand):
    def run(self, cmd=[], *args, **kwargs):
        if not cmd and not kwargs.get("kill", False):
            # if cmd is empty, open the command_palette with the available build list
            self.window.run_command("show_overlay", {"overlay": "command_palette", "text": "Build: " + kwargs.get("prefix", "")})
        else:
            # if there is a cmd, run the standard exec command
            super(ExecCommand, self).run(cmd, *args, **kwargs)


Thanks for reading.
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Build System enhancements

Postby bizoo on Wed Oct 23, 2013 7:44 am

bump.
The current Build System is very basic, I think these additions make it a lot more usable, at least for me.
Please Jon if you don't consider implementing these requests, give me an answer.
At least I could try to implement them myself (for the things that doesn't need new API methods).
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 7 guests