On Saturday 14 June 2003 16.33, Joao Pedrosa wrote:
> Hi,
>
> --- Michael Neumann <mneumann / ntecs.de> wrote:
> > On Sat, Jun 14, 2003 at 10:01:36PM +0900, Joao
> >
> > Pedrosa wrote:
> > > Hello,
> > >
> > > I have some source code that is terribly
> >
> > formatted. It needs some good
> >
> > > indentation at least. But I am too lazy to do it
> >
> > all by hand.
> >
> > > Does anyone know a tool to do the job ?
> >
> > Vim can format Ruby code (visual select then press
> > '=').
> >
> > Regards,
> >
> >   Michael
>
> Vim did format it, but not as expected. It doesn't even indent
> correctly for me. Anyone can confirm that it doesn't work properly ?
>
> Thanks Michael,
> Joao

I thought about this not long ago, while working on a piece of software along 
with several others, all with their own special little way of formatting (a 
multi-language project, java, C/C++, C# and ruby mostly) trying to identify 
important changes from cvs logs was a pain in the *** after the different 
editors and different code styles messed things up. It ended up so bad 
eventually that something had to be done, forcing everyone to write in the 
same fashion would waste time and probably dampen productivity.

Everything that was to be commited to the cvs had to be passed through 
indentation programs, astyle and gnu indent covered C/C++/java but we didn't 
find any such utilities for Ruby and C# (which had a visual impact on the 
project scheduled after analyzing progress reports).

afaik, there is no such application for Ruby (as a sidenote, any handwritten 
ruby lexer in ruby? ;) perhaps it is time for the development of such an 
application? Personally I'd love to be able to atleast format around the 
differences in block structures ( {} compared to do ... etc.), the obvious 
depth-indentation and probably a few other things I can't seem to remember 
right now :-)

/ Bj?rn St?hl