I think that might have been a little harsh. What I mean is this: The web preview works awesome for real time viewing of html code. I am amazed. Really. But, I don't know anyone who write HTML anymore. Sometimes to make a Smarty Template, I'll write HTML and then retrofit it, but usually not. The web preview needs to be able to read from a valid URI, like http://127.0.0.1/projects/clientX/index.php
I would at least like to find a solution to get Safari and/or Firefox to refresh on save. But I think the built in tool using webkit would be coolest. Has anyone figured this out?
Thank you,
--==<< R i c h a r d B r o n o s k y >>==--
Wouldn't it be nice to be able to set a base URI for each project, and have the webpreview use that?
.Anders
I think that might have been a little harsh. What I mean is this: The web preview works awesome for real time viewing of html code. I am amazed. Really. But, I don't know anyone who write HTML anymore. Sometimes to make a Smarty Template, I'll write HTML and then retrofit it, but usually not. The web preview needs to be able to read from a valid URI, like http://127.0.0.1/projects/clientX/index.php
I would at least like to find a solution to get Safari and/or Firefox to refresh on save. But I think the built in tool using webkit would be coolest. Has anyone figured this out?
Thank you,
--==<< R i c h a r d B r o n o s k y >>==--
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Feb 22, 2005, at 6:25, Bruno Bronosky wrote:
I think that might have been a little harsh.
I'm glad that you do not think my time was completely wasted then! :)
What I mean is this: The web preview works awesome for real time viewing of html code. I am amazed. Really. But, I don't know anyone who write HTML anymore.
I use the preview myself a lot -- I often write small pieces of HTML (e.g. when posting online) where I mainly just want to ensure that my formatting is correct, and for that I use the preview. Though I rarely use the “live” feature of it.
It also happens at times that I have a HTML snippet that I just want to view w/o having to create, save, and load a file in my browser.
Sometimes to make a Smarty Template, I'll write HTML and then retrofit it, but usually not. The web preview needs to be able to read from a valid URI, like http://127.0.0.1/projects/clientX/index.php
Yes, this is on the to-do. But I think that people who need this, would probably still prefer a real browser even with this feature. But I am aware that the web-preview has fallen a little behind with regard to the requests I have received for it.
I would at least like to find a solution to get Safari and/or Firefox to refresh on save. But I think the built in tool using webkit would be coolest. Has anyone figured this out?
You may want to use Stakeout [1] for that. It can monitor a file and e.g. perform an action when the file is saved (which would be to send reload to Safari/Firefox).
[1] http://michael-mccracken.net/blog/blosxom.pl/computers/mac/programming/ meetWatch.html
On Feb 22, 2005, at 6:16 AM, Allan Odgaard wrote:
I would at least like to find a solution to get Safari and/or Firefox to refresh on save. But I think the built in tool using webkit would be coolest. Has anyone figured this out?
You may want to use Stakeout [1] for that. It can monitor a file and e.g. perform an action when the file is saved (which would be to send reload to Safari/Firefox).
[1] http://michael-mccracken.net/blog/blosxom.pl/computers/mac/ programming/meetWatch.html
Yes, Stakeout looks very cool. I also thought of using folder actions for this, but I don't know how to get Safari or Mozilla to refresh from a command line or AppleScript. Does anyone have a working example for this?
In BBEdit I used to use a script like this: Save and Refresh Safari.scpt tell application "BBEdit" save window 1 end tell
tell application "Safari" do JavaScript "location.reload()" end tell
But that stopped working with one of the updates to OS X. I would like to see an AppleScript that would check to see if the current file's URI was open in any Safari window or tab. If so bring it to the front and refresh, else open a new tab with the URI.
Any ideas? I can't be the first person to try this.
On 22 Feb 2005, at 21:43, Bruno Bronosky wrote:
In BBEdit I used to use a script like this: Save and Refresh Safari.scpt tell application "BBEdit" save window 1 end tell
tell application "Safari" do JavaScript "location.reload()" end tell
But that stopped working with one of the updates to OS X. I would like to see an AppleScript that would check to see if the current file's URI was open in any Safari window or tab. If so bring it to the front and refresh, else open a new tab with the URI.
Any ideas? I can't be the first person to try this.
Bruno & others,
I did some commands a few months ago, that does some of the things you'd need. Doesn't deal with Safari/Firefox tabs, as they are not AppleScriptable so we can't reach them. Unless someone knows better this is the best we can do at the moment. :(
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On Feb 21, 2005, at 7:25 PM, Bruno Bronosky wrote:
But, I don't know anyone who write HTML anymore. Sometimes to make a Smarty Template, I'll write HTML and then retrofit it, but usually not. The web preview needs to be able to read from a valid URI, like http://127.0.0.1/projects/clientX/index.php
Are we missing the point here? I use preview for CSS more than anything, as it requires constant tweaking and viewing. I need to instantly see the result of a tiny change in an inline or block style without having to save.
If this can be accomplished AND be able to easily switch rendering engines (in Web Preview GUI), then I imagine we'll see a lot more web developers (esp. CSS people) converting to TM. And that means profits for the TM team.
That's why I'd like to see the Web Preview development "catch-up"
On Feb 21, 2005, at 9:25 PM, Bruno Bronosky wrote:
I think that might have been a little harsh. What I mean is this: The web preview works awesome for real time viewing of html code. I am amazed. Really. But, I don't know anyone who write HTML anymore. Sometimes to make a Smarty Template, I'll write HTML and then retrofit it, but usually not. The web preview needs to be able to read from a valid URI, like http://127.0.0.1/projects/clientX/index.php
If you have Ruby 1.8.2 installed, you can preview a selected URL with a command such as:
ruby << 'END' require 'open-uri' open(ENV['TM_SELECTED_TEXT']) {|f| puts f.read} END