Is there a way to format code in TextWrangler?

dev.e.loper picture dev.e.loper · Sep 29, 2011 · Viewed 33.6k times · Source

I'm using TextWrangler on Mac OS X to do some web development. Is there a way to auto format code?

Answer

Sam picture Sam · Oct 22, 2012

Yes, there is a possibility but not a simple one. Using Text Filters, if you can find a filter your choice you put it into Library/Application Support/TextWrangler/Text Filters and reach it from Text/Apply Text Filter menu.

This is how you do it for XML: http://magp.ie/2010/02/15/format-xml-with-textwrangler/

and for PHP: http://wizguild.com/textwrangler_phptidy_filter/