There's an initiative to unify the web preview output of all different run tools (RubyMate, PyMate etc) and this is fine and dandy. However, I've been thinking about going a step further and creating a generic "RunMate" that can be configured to capture output and do the stuff the other "Mates" are capable of.

So attached is a draft version of such a tool called "RunMate.rb". Just drop it in Library/Application Support/TextMate/Support/Bin or where you keep your custom stuff.

It's used by specifying the following arguments:

--format=[fmt] (fmt can be "gcc", "ruby", "javac" or "haxe" at the moment). 
--ant (strips the stuff ant adds to its subtools' output)
--run=[cmd] (run the specified command and capture its output. STDERR and STDOUT are caught automatically)

So, here's how a java ANT build could look like: RunMate.rb --format=javac --ant --run="ant -s build.xml"

And a ruby run thing: RunMate.rb --format=ruby --run="ruby \"$TM_FILEPATH\""

I don't know if you believe going forward with this is a worthwhile effort so please give comments and suggestions.


--
Mikael Säker <mikael@sicher.org>
http://www.sicher.org

"Strangers have the best candy."