Forum: Ruby Ruby auto formatter

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2cf408af3f08d3575c9cd7697158a8f1?d=identicon&s=25 Jamal Mazrui (Guest)
on 2006-04-11 18:45
(Received via mailing list)
Is there a Windows tool that does a reasonable job of globally
formatting an existing Ruby script file so that it complies with the
convention for code indentation?

Jamal
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2006-04-11 19:19
(Received via mailing list)
Jamal Mazrui wrote:
> Is there a Windows tool that does a reasonable job of globally
> formatting an existing Ruby script file so that it complies with the
> convention for code indentation?
>
> Jamal
>
>
have not tried it but,,,,,
http://www.arachnoid.com/ruby/rubyBeautifier.html
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-04-12 02:19
(Received via mailing list)
DÅ?a Utorok 11. Apríl 2006 18:42 Jamal Mazrui napísal:
> Is there a Windows tool that does a reasonable job of globally
> formatting an existing Ruby script file so that it complies with the
> convention for code indentation?
>
> Jamal

You can get one of the emacsen to load the file and reindent it in batch
mode,
ruby-mode does a pretty god job at that - I know I got someone to give
me the
whole command line a while ago, but lost the message since, try
searching the
forums for it.

David Vallner
A402df36168b81b31c17adcbb5ae8cf4?d=identicon&s=25 Pistos Christou (pistos)
on 2006-04-12 22:32
David Vallner wrote:
> DÅ?a Utorok 11. Apríl 2006 18:42 Jamal Mazrui napísal:
>> Is there a Windows tool that does a reasonable job of globally
>> formatting an existing Ruby script file so that it complies with the
>> convention for code indentation?
>>
>> Jamal
>
> You can get one of the emacsen to load the file and reindent it in batch
> mode,
> ruby-mode does a pretty god job at that - I know I got someone to give
> me the
> whole command line a while ago, but lost the message since, try
> searching the
> forums for it.

Not that you would want to do this with large quantities, but FWIW, I
thought I'd mention:

$ diakonos -e 'anchorSelection; cursorEOF; parsedIndent; saveFile; quit'
my_file_which_needs_auto_indenting.rb

Pistos
This topic is locked and can not be replied to.