Code beautifiers, anyone?

Matti J. Karki mjk at
Thu Aug 24 13:19:05 UTC 2006

On 8/24/06, Kyrre Nygård <kyrreny at> wrote:
> I'm looking for the best ways to create a line of code beautification
> (reformatting) scripts -- one for C, one for Ruby, one for Bash and
> one for web development languages like XHTML, XML, CSS, PHP and Ajax.
> Whether as frontline warriors or household maids, they would ensure
> proper indentation, linebreaks, spaces, tabs and so forth.
> I wish to be in full control of my code beautifiers. That is, I wish
> to have them as simple and meaningful as possible. Give me an easy
> Bash over a complex Ruby any day.

Well, my suggestion to anyone asking this question is that the best
thing IMHO is to learn some scripting language with good regular
expression support. For example Tcl, Python or Perl. I have to deal
with all sorts of source code and I have noticed that - for me - the
easiest path is to first study the source code and then create a
simple script to beautify the code. It takes less time than trying to
find some suitable tool, which may not even product exactly the style
I want.


More information about the freebsd-questions mailing list