Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 08:22:26 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Wanted: Comparison of code beautifiers  (Read 2385 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,766
    • View Profile
    • Donate to Member
Wanted: Comparison of code beautifiers
« on: November 15, 2009, 08:37:46 AM »
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

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Wanted: Comparison of code beautifiers
« Reply #1 on: November 19, 2009, 04:32:54 PM »
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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,405
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: Wanted: Comparison of code beautifiers
« Reply #2 on: November 20, 2009, 02:31:39 PM »
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.sourcefor...m/code-formatter.htm

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,766
    • View Profile
    • Donate to Member
Re: Wanted: Comparison of code beautifiers
« Reply #3 on: November 20, 2009, 02:52:36 PM »
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

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Wanted: Comparison of code beautifiers
« Reply #4 on: November 20, 2009, 04:45:55 PM »
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.
« Last Edit: November 20, 2009, 04:47:51 PM by MilesAhead »