Let TextWrangler key to optimize XML file format

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!

Anyway,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 Text →. Apply Text Filter →. Tidy XML You can!

Tidy XML

Tidy XML

Original article written by LogStudio:R0uter's Blog » Let TextWrangler key to optimize XML file format

Reproduced Please keep the source and description link:https://www.logcg.com/archives/1652.html

About the Author

R0uter

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

Leave a Reply

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