Skip to content
Davide Ficano edited this page Apr 5, 2013 · 1 revision

Damn! On my MacOS ViewSourceWith opens multiple application instances

Since version 0.5.2 the run editor dialog automatically fills the path field with /usr/bin/open and set correctly the parameters, user no longer needs to make the manual configuration shown below.

Since version 0.0.8.2 it is possible to pass command line arguments to editors.

Under MacOSX this feature required radical changes on code due to a bug present on all Mozilla applications. Many users suggest solutions and workarounds and here you find them.

Use the 'open' application distributed with MacOSX

Stefan Nowak says: "Simply use '/usr/bin/open' available in all OSX versions (as far as I know and as far as the manpage says)."
To successfully view your HTML page source code in other apps, set this in VSW:

Editor Path : /usr/bin/open
Parameters  : -a /path/to/your.app $f
IMPORTANT: the path must end in '.app', as 'open' only works correctly if you refer to the '.app', but fails if you call any binaries within the '.app' bundle directly.
Direct binary targeting is especially inflexible if you have FAT binaries (intel and ppc), therefore targeting '.app' is highly recommended.
Target '.app' and let the system decides which binary to start.

Escaping spaces from path: Path containing spaces must be escaped using the \ (backslash) character before the space

TextWrangler

Tim Wood shows us how to use open to succefully use ViewSourceWith with TextWrangler and Dreamweaver

Editor Path : /usr/bin/open
Parameters  : -a /path/to/TextWrangler.app $f

DreamWeaver & DreamWeaver 8

Editor Path : /usr/bin/open
Parameters  : -a /path/to/Dreamweaver\ 8 $f

I'm not sure why DreamWeaver doesn't require the .app at the end of the application name. It must be a Macromedia thing ;-)
It's worth noting that this approach will solve the opening multiple copies of an app problem.

DreamWeaver CS3

Editor Path : /usr/bin/open
Parameters  : -a /path/to/Dreamweaver.app $f
Note: Unless you moved DW, the default path would be /Applications/Adobe\ Dreamweaver\ CS3/Dreamweaver.app

TextMate

Editor Path : /Applications/TextMate.app/Contents/Resources/mate

You can find more details here

Using other free utility

This solution was suggested to me by Leigh.

You can use launch application that allows to run app bundles from command line.

For example to have only one TextEdit instance you can specify:

Editor Path : /usr/bin/launch
Parameters  : /Applications/TextEdit.app $f