ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Wanted: Comparison of code beautifiers

(1/1)

Tuxman:
I am currently digging through stuff like astyle, but I don't really have the time and knowledge to see which of the several code beautifiers does the most interesting stuff. Is there some kind of a comparison?

MilesAhead:
LIkewise if anyone knows of good ones for AHK I'd appreciate it.  Right now the closest I've found is Auto-Syntax-Tidy v12.  But it's not consistent.

I'm looking for a beautifier, preferably in-editor, to hit a button and reformat the code sort of like DelForEx in Delphi... not just syntax highlight.

Auto-Syntax-Tidy v12 does it, but sometimes it indents the braces so that they don't line up with the first character in the statement above(it indents the braces an extra level sometimes, sometimes not. If I have to go back and out-dent manually then that kills the reason for using it.)

wraith808:
No comparison, but I've used SourceFormatX for a while, and I really like it.  Decently priced, a GUI with preview for tweaks to how it handles formatting, and a decent editor...

http://www.sourceformat.com/code-formatter.htm

Tuxman:
For that I'd recommend the UniversalIndentGUI which is actually free:

http://universalindent.sourceforge.net

It includes a bunch of code beautifiers but doesn't actually compare them...

MilesAhead:
For what it's worth I did use astyle a bit with Visual C++ 6.  It did the job from the command line but I never figured a way to have it work in the IDE.  I got so used to DelForEx checking my code in Delphi that it's tough to do without something similar.  Visual Studio had a built-in one that worked on selected blocks.  I got by with that.  But for reformatting a whole file, such as code found on web sites or done in a different style, astyle was ok.

For AHK I found that by backing off Scite to 1.73 and disabling folding, I could run the Tidy utility I mentioned to take care of capitalization, then use the built-in Indent Checker command to fix the braces if needed.  2 steps but better than loading an output file and renaming.

Navigation

[0] Message Index

Go to full version