The source code for templates in Wikipedia, Wiktionary, and all MediaWiki is usually written in a congealed lump like this:
<includeonly>{{#if:{{{2|}}}|[[{{{1}}}#{{{2}}}]]|[[{{{1}}}]]}} - [http://www.onelook.com/?w={{urlencode:{{{1|{{PAGENAME}}}}}}}&ls=a OneLook] - {{googles|"{{{1}}}"}}</includeonly><noinclude>{{documentation}}</noinclude>
As you can see it's very hard to read, to match the various kinds of brackets and braces and pipes, etc. It's hard to get any idea what somebody else's template code does.
I'm looking for a code editor on Mac or Windows, even Linux that can both syntax highlight and beautify/indent this code. It would be great if it could also re-minify it back into the congealed lump afterwards so other wiki contributors don't complain (-;
I'd also be interested in a plugin or mode for any existing editor that can add these functions.