views:

334

answers:

3

Where can I find a decent Ruby source beautifier? I want something customizable and reliable. I found this but I'm not convinced.

A: 

In 1.9.1 you can use the -w option to report whitespace violations. Not really a pretty-printer like cb or tidy, but it will show you the warts.

sal
+1  A: 

You can download netbeans and source format your code with it.

Lichtamberg
+2  A: 

Use Vim or GVim, open ruby source, select everything (key sequence):

gg
Shift+V
G
=

that will autoindent your source. to save and quit, type:

:wq
skrat
Do it all the time, like this: gg=G
hgimenez