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.
Jamal M. (Guest)
on 2006-04-11 20: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
Reid T. (Guest)
on 2006-04-11 21:19
(Received via mailing list)
Jamal M. 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
David V. (Guest)
on 2006-04-12 04:19
(Received via mailing list)
DÅ?a Utorok 11. Apríl 2006 18:42 Jamal M. 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 V.
Pistos C. (Guest)
on 2006-04-13 00:32
David V. wrote:
> DÅ?a Utorok 11. Apríl 2006 18:42 Jamal M. 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.