[TxMt] Open Document in Running Browsers/Refresh in Firefox

Thomas Aylott (subtleGradient) oblivious at subtlegradient.com
Sun Mar 25 16:54:45 UTC 2007


On Mar 25, 2007, at 11:56 AM, Henrik Nyh wrote:
> Nathan Koch wrote:
>> I've found this topic a few times in the archives, but never came  
>> up with a definitive answer.
>> I'm using Textmate for basic XHTML/CSS/JavaScript editing and  
>> while Camino and Safari happily pop right up when I choose "Open  
>> Document in Running Browser(s)" and Refresh when I pick "Refresh  
>> Running Browser(s)"
>> but Firefox responds a bit differently.
>> It doesn't respond at all to "Open Document in Running Browser(s)"  
>> and Refresh Running Browser(s)" just opens a new, empty, window or  
>> tab.
>> It's a bit frustrating as Firefox is my browser of choice for  
>> working on sites, thanks of course to the Web Development plugin  
>> among others.
>> Any advice?
>
> Firefox isn't very scriptable. The command tries to make it reload  
> in two ways, both of them a bit fragile.
>
> If System Preferences > Universal access > "Enable access for  
> assistive devices" is activated, it switches to Firefox and fakes  
> pressing ⌘R.
>
> If access for assistive devices is not activated, it instead tells  
> Firefox to open "JavaScript:window.location.reload();". That fails  
> if Firefox is configured to open pages in new tabs.
>
> So the solution is to enable access assistive devices, or change  
> your Firefox tab settings.

Another way we might want to make "open in firefox" work would be to  
save a temporary file and set it's "open with" property to FireFox.
I think that's the old school creator flag. I know there's a way to  
set that property from the shell.
Then you'd just have to replace the contents of the file and use the  
open command.

thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070325/3485ece1/attachment.html>


More information about the textmate mailing list