TextWrangler Mac is the indispensable multi-purpose text editor,Excellent built-in code highlighting,Also supports regular expression searches ...... summary,For developers,It is necessary manpower。

but,TextWrangler for XML Not so smart - and often long after the opening line!

In short,The solution is simple,We can write a script to TextWrangler。

First of all

TextWrangler open a new blank document (the default is actually),Enter the following script statements:

Save

save document,But the path there Press shift + command + g Go to open the dialog,enter ~/Library/Application Support/TextWrangler/Text Filters/ turn on。

And then named Tidy XML.sh Save it。

use

At last,TextWrangler using Open your xml file,Click TextApply Text FilterTidy XML You can!

Tidy XML
Tidy XML

Published by R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a comment

Your email address will not be published. Required fields are marked *