Thank you for sharing this, JollyRoger. I don't want to belittle your achievement in pointing out an alternative way to get similar results: For most languages, especially for c-ish ones, it is easy to integrate an external code beautifier with PSPad by setting it up as an external app in the highlighter settings. Just specify something like C:\Programme\AStyle\bin\AStyle.exe --style=ansi --indent=spaces=2 "%File%" in the "Program" field. Personally, I recommend AStyle (viz http://astyle.sourceforge.net/ ). The only drawback I have found so far is that there must be one empty line at the end of the file, otherwise an extra bracket will be added.
-- <http://forum.pspad.com/read.php?2,35711,35719> PSPad freeware editor http://www.pspad.com
