Hi all,
TextMate is everyday more complete and perhaps the best editor!
Only a little request for me (Allan has already added some nice features, like command to convert accented chars to entities, and so on): to enhance the live preview a bit. It already shows javascript, but it would be nice it show also php output (like TacoHTMLEdit do) and - why not? - also perl (and cgi) output, without install pages on /localhost. With Taco we can edit a little page with javascript and php everywhere (on desktop, hi), control it with preview and then install in /Sites. TextMate could show in its preview not only javascript and css, but also php (perl?), so we can also simulate Dreamweaver :-)
Thanks Allan and the whole team!
Regards
Salvo M.
On 16/08/2005, at 20.22, salvo wrote:
It already shows javascript, but it would be nice it show also php output (like TacoHTMLEdit do) and - why not? - also perl (and cgi) output, without install pages on /localhost. With Taco we can edit a little page with javascript and php everywhere (on desktop, hi), control it with preview and then install in /Sites.
If you open the HTML preview window, you can check “Show Options” to open the side drawer, where you can check “Pipe text through” and provide “php” as the command.
This won't give you the same environment as apache, but it will interpolate <?php ... ?> fragments.
On Sep 1, 2005, at 7:47 AM, Allan Odgaard wrote:
On 16/08/2005, at 20.22, salvo wrote:
It already shows javascript, but it would be nice it show also php output (like TacoHTMLEdit do) and - why not? - also perl (and cgi) output, without install pages on /localhost. With Taco we can edit a little page with javascript and php everywhere (on desktop, hi), control it with preview and then install in /Sites.
If you open the HTML preview window, you can check “Show Options” to open the side drawer, where you can check “Pipe text through” and provide “php” as the command.
This won't give you the same environment as apache, but it will interpolate <?php ... ?> fragments.
I may have asked this before...
Is there any way to do a live preview to a different server. If, say, i'm editing an ASP file through an SMB share on an IIS server. Can I do a preview of the rendered version of the page? If i'm editing a CSS file on the same server, can I preview the page that calls that CSS file? ...and have it update that preview every time I make a change? Can I have a back rub and a cookie?
Maybe i'm asking too much. :D
On 01/09/2005, at 14.54, thomas Aylott wrote:
Is there any way to do a live preview to a different server. If, say, i'm editing an ASP file through an SMB share on an IIS server. Can I do a preview of the rendered version of the page? If i'm editing a CSS file on the same server, can I preview the page that calls that CSS file?
TM wouldn't be able to do this on its own, but of course you can point a browser, Safari say, to the relevant page, and use commands such as 'Reload Safari' (bound to cmd-R).
-- Sune.
On 1 Sep 2005, at 14:54, thomas Aylott wrote:
Is there any way to do a live preview to a different server. If, say, i'm editing an ASP file through an SMB share on an IIS server. Can I do a preview of the rendered version of the page?
Instead of using the live preview, you could write a command (bound to a key combo) that uses cURL to fetch a rendered version of the current script from the server, and output the buffer to an HTML window. E.g.:
#------- LOCAL_SERVER="your.server.name" FILEPATH=`echo "$TM_FILEPATH" | sed 's|/Volumes/SHARE/PATH/||'` # Or wherever the mounted web root is
curl -s http://%24LOCAL_SERVER/%24FILEPATH #-------
Select output to "Show as HTML", et voilà.
This will only work for simple ASP pages; stuff like session and request parameters won't be available.
Regards,
Rich
On 9/1/05, Allan Odgaard allan@macromates.com wrote:
If you open the HTML preview window, you can check "Show Options" to open the side drawer, where you can check "Pipe text through" and provide "php" as the command.
Would it be possible to have it set to a fixed URL, and refresh on changes to the active file?
I remember having an issue with it when working on an external CSS file, and not being able to see the changes on a different HTML file.
Cheers, Douglas
On 01/09/2005, at 15.14, Douglas Livingstone wrote:
If you open the HTML preview window, you can check "Show Options" to open the side drawer, where you can check "Pipe text through" and provide "php" as the command.
Would it be possible to have it set to a fixed URL, and refresh on changes to the active file?
No, that's not possible.
The web preview has been neglected because, well, I rarely use it, and the various requests indicate that people really want a full Safari, perhaps even with some Firefox features (cookie editor, javascript error log), and having it go through apache -- and the net result would be that the only difference between this and just use cmd-R for save + reload Safari/Firefox, is, that the cmd-R would happened periodically.
So clearly the better route would be to allow a way to setup periodic events and/or allow a plugin to be notified on document changes (and factor the web preview out into a plugin, hoping others would make it into more of a browser, if that's desired).
I do however have some improvements planned, since I consider some parts of the current web preview broken, but for a full browser, I think that should be delegated to an actual browser :)
I do however have some improvements planned, since I consider some parts of the current web preview broken, but for a full browser, I think that should be delegated to an actual browser :)
If one of those improvements is to make it so that it stays open when you click on a different file, that would be wonderful and meet my needs.
Brent
On 01-09-2005 15:14, Douglas Livingstone wrote:
On 9/1/05, Allan Odgaard allan@macromates.com wrote:
If you open the HTML preview window, you can check "Show Options" to open the side drawer, where you can check "Pipe text through" and provide "php" as the command.
Would it be possible to have it set to a fixed URL, and refresh on changes to the active file?
This sounds like a job for stakeout (mentioned here a couple of days ago) and then let it call an applescript to refresh your browser or set it to a specific URL.
Jeroen.