[TxMt] Re: Adding Executor/Run Script for Custom Bundles

Rob McBroom mailinglist0 at skurfer.com
Wed May 5 12:13:51 UTC 2010

On May 3, 2010, at 4:36 PM, Kenny Scott wrote:

> I really love the functionality, with apple command + R that allows me to run a Perl Script or Shell Script, or what have you, and display the results in HTML. This would be really helpful, in place of being forced to run each document in terminal to view the output. My command is simply "zml myzmlfile.txt" and I want to leverage the bundle editor to get this going.

Create a command along these lines:

    . "$TM_SUPPORT_PATH/lib/webpreview.sh"
    html_header "Some title for the window"
    zml "$TM_FILEPATH"

You'll probably want nothing for input and output. Be sure to set the scope selector so it only applies to ZML.

Take a look at the "Preview" command in the Markdown bundle. That's a fairly simple example of a command that uses the "web preview" window.

Rob McBroom

Because it screws up the order in which people normally read text.

Original message:

> Why is it bad to top-post your reply?

More information about the textmate mailing list