[TxMt] enhance live preview

textmate at mac.com textmate at mac.com
Fri Sep 2 07:09:32 UTC 2005

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.:

FILEPATH=`echo "$TM_FILEPATH" | sed 's|/Volumes/SHARE/PATH/||'` # Or  
wherever the mounted web root is

curl -s http://$LOCAL_SERVER/$FILEPATH

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.



More information about the textmate mailing list