[TxMt] ANN: Live Preview Filter for CSS, HTML, Textile, Markdown, Rails Views & Live Diffs

thomas Aylott thomas.42 at gmail.com
Sun Jun 11 13:29:17 UTC 2006


Howdy.

Enjoy instant-ish feedback!!!!1!
http://textmate.svn.subtlegradient.com/Support/bin/ 
42_TextMate_live_preview.rb

Put the full path to that file in the Pipe text through box in the  
Web Preview Window

For CSS, it'll ask you to open a file and paste a test-url in there.  
It completely replaces all links to css files with the css you're  
previewing, AS YOU TYPE!!!1!

For HTML, it inserts a base tag with the TM_PROJECT_SITEURL

For Rails Views, it redirects the page to the saved version via your  
TM_PROJECT_SITEURL. Just try it out, you may hate it ;).

For markdown and textile, it renders it as markdown or textile. Never  
worry about changing your filter script!

For all other source files, it does a live diff between the saved and  
unsaved version. No coloring of anything fancy, but handy (yes, i  
know all about the diff bundle).

For everything else, it does nothing special, yet.


I tried t do this a while ago but i couldn't make it work. Turns out  
that only a few TM specific variables were being set. Allan has since  
fixed that.

Personally, I think this script is really stupid and unnecessary. But  
extremely handy as a stopgap until we get something that is supposed  
to replace this.

Basically, if we had a way to make ANY command rerun itself or  
refresh after change, then this filter would be totally unnecessary  
and we could make each of these things a separate refresh-after- 
change command. Allan, add it to the list?

enjoy

Also! If anybody has any improvement suggestions, suggest away! I'm  
all for it. I only knocked this thing together last night when i  
should have been sleeping. Most things are not done the best way.  
Feel free to improve or replace. Enjoy!

thomas Aylott—subtleGradient


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060611/89223a8d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.png
Type: image/png
Size: 7835 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060611/89223a8d/attachment.png>


More information about the textmate mailing list