Home Download Buy Blog Forum Support

ST3: Project build systems not showing up in command window

ST3: Project build systems not showing up in command window

Postby BTG on Sat Apr 13, 2013 2:05 am

I have a build system defined in my project, and it shows up in the Tools | Build System menu, but it does not show up when pressing Ctrl+shift+P. If I select it as the active one then it shows up there. When/how does Sublime determine when to use/make available the build systems within a project vs. the globally defined ones?

The effect I'm looking for is being able to define a project build system to spawn external tools in addition to the globally selected build system, but if it's not published to the menu there's no easy way for me to access it.
BTG
 
Posts: 10
Joined: Thu Apr 11, 2013 2:35 am

Re: ST3: Project build systems not showing up in command window

Postby BTG on Tue Apr 16, 2013 3:51 am

Nothing?

All I'm trying to do is create the ability to launch an external tool and parse its results without having to select a new build system.
BTG
 
Posts: 10
Joined: Thu Apr 11, 2013 2:35 am

Re: ST3: Project build systems not showing up in command window

Postby skuroda on Tue Apr 16, 2013 4:39 am

I think you are looking for the variants key in the build system.

http://docs.sublimetext.info/en/latest/ ... l#variants

From the docs

Given these settings, Ctrl + B would run the date command, Crtl + Shift + B would run the Python interpreter and the remaining variants would appear in the Command Palette whenever the build system was active.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: ST3: Project build systems not showing up in command window

Postby BTG on Tue Apr 16, 2013 2:01 pm

Variants apply only to a single build system. What I'm asking is for is to be able to have a default build system selected with variants A, B, and C, and also have a build system defined within my project with variants X, Y, and Z, and thus be able to choose to build A/B/C/X/Y/Z from the build menu. This is so I can work around the apparent limitation that any external tool that generates parsed output must be defined as a build system.
BTG
 
Posts: 10
Joined: Thu Apr 11, 2013 2:35 am

Re: ST3: Project build systems not showing up in command window

Postby skuroda on Tue Apr 16, 2013 5:46 pm

I see. I believe the commands listed in the command palette are those offered by the build system. variants As you can't have multiple build systems specified per project (I think), I don't think it's possible to use the native build system to achieve what you want. That being said, I believe the build system are just a series of arguments passed to the "exec" command in Default/exec.py. So you can probably write your own plugin, perhaps wrapping the exec command, and add your own entries to a Default.sublime-commands file, which will then be added to the command palette. Actually, if you are just modifying the arguments to the exec call, you need a plugin, just specify the appropriate values as args in the Default.sublime-commands file.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 28 guests