[TxMt] HTML Tidy

Timothy Martens timfm at hawaii.rr.com
Thu Dec 2 23:30:50 UTC 2004

Thanks Eric. I'll see if I can get this working for me. I may have some 
?s about how to tweak output.

On Dec 2, 2004, at 5:28 AM, Eric Hsu wrote:

>> Has this been brought up as a feature request? skEdit's (i'm using it
>> while I wait for my Paypal deposit) tidy functionality is very well
>> thought out. I'd like to see something similar in TM.
> Here is my current kludge to get two HTML Tidy commands: one replaces 
> a window with its Tidy-ed version, and another just produces a window 
> with clickable error output.  Note that (bug? feature?) if HTML Tidy 
> thinks there are errors in your document and you do a 'replace' then 
> it will place the errors at the top of the document. You can fiddle 
> with the Tidy flags to avoid that.
> Also note that my version only runs on the last saved version and not 
> the current one. That can also be tweaked...
> Anyway, get HTML Tidy from http://tidy.sourceforge.net/ then install 
> it someplace convenient. I put the command-line version at ~/bin/tidy
> Report Errors Command:
> Before: nothing
> Command: ~/bin/tidy -e "$TM_FILEPATH"
> Stdin: None
> Stout: Sep window
> Pattern: line (\d+) column (\d+) - (.*?)$
> Format: $3
> Line: 1
> Replace Document with Tidy-ed Version Command:
> Before: nothing
> Command: ~/bin/tidy -bicq "$TM_FILEPATH"
> Stdin: None
> Stout: Replace doc
> Pattern:
> Format:
> Line:
> Works great for me!
> - Eric
> -- 
> Eric Hsu, Assistant Professor of Mathematics
> San Francisco State University
> erichsu at math.sfsu.edu
> http://math.sfsu.edu/hsu
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate

More information about the textmate mailing list