Sublime Forum

Build System should allow Run, Test, Verify, Preview, etc

#1

Also posted at http://sublimetext.userecho.com/topic/61233-/

I’ve just been using ST for a few hours but it occurs to me that some plugins (notably RubyTest) are bending over backwards to do things that maybe should be provided by the existing Build System architecture.

If Build Systems could provide more that just one “cmd” then each file type could have its own system for doing a whole panoply of common tasks:

  • Build (as currently defined)

  • Run (build and execute)

  • Verify (“lint” for .c, “ruby -cw” for .rb, validator.w3.org/check for .html)

  • Preview (turn the file from Markdown etc. into HTML, then launch a browser)

  • Test (for foo.rb, open and run foo_test.rb)

The above is probably overspecified, but think about what it would take to have a common system at least for “Build/Run/Preview”. Then every file type would have the same key command and menu option for these common tasks.

(BTW I’m about to take a crack at making Markdown Preview work as cmd-B in the current build system.)

0 Likes

#2

I agree that the build system should allow options, such as run, defined by the build system.
I use more custom build setups with unusual build options and the likes, providing me tons of ways to build and run my setup, all handled by peculiar makefiles or the likes. Thing is, it’s annoying to have to go to a terminal to execute different types of build, or having to change build system completely.
Instead, the build system should allow to register an arbitrary amount of build commands and options for a build system, with seperate keymap configuration for the various types of build - or, at least, some default types of build options, such as build, run and test

mockup buildfile:

{
   "build": "make"],
   "run": "binaryPath"],
   "test": "binaryPath --specialArgs"],
   working_dir....
}

However, how it is implemented, is up to the author. I could write a plugin to do it, but it would be nice if the builtin build system allowed for a bit more options (despite already being great - it just lacks a few more common options)

That aside, I’m in love with this editor.

0 Likes

#3

Take a look at http://www.sublimetext.com/forum/viewtopic.php?f=5&t=5794&start=0

0 Likes