Hi, I'm trying to get TM to work with the viewsourcewith addon for Firefox (found here https://addons.mozilla.org/en-US/firefox/addon/394/ ) . I have mate installed at /usr/local/bin/mate . I'd like to be able to jump from the Firefox error console to the correct line in my open TM document.
The viewsourcewith addon asks for the path and parameter. I've given my path as /usr/local/bin/mate and the parameter as $f . This indeed opens TM, but it does not take me to the line referenced in the error console. Suggestions would be appreciated. Thanx.
On Jan 8, 2011, at 1:33 PM, Steve wrote:
The viewsourcewith addon asks for the path and parameter. I've given my path as /usr/local/bin/mate and the parameter as $f . This indeed opens TM, but it does not take me to the line referenced in the error console. Suggestions would be appreciated. Thanx.
It looks like the `mate` command has a `-l` option, so `mate -l 25 source.html` would take you to line 25. You just have to figure out how to pass the line number, I guess.
Also, take a look at this part of the manual.
http://manual.macromates.com/en/using_textmate_from_terminal#url_scheme_html
You can have a line number in the URL. If it requires a Terminal command and can't use a URL directly, the `open` command should do the right thing. (i.e. `open 'txmt://open/?url=source.txt&line=25'`)