Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beautify Ruby source code with Geany

How can I get Geany to beautify or prettify ruby code? What's the distinction between the two, anyhow?

My main interest is indents, that the indenting is consistent and correct.

I would like to integrate the gem into Geany if there's no plugin.

See also:
SO question 1194185
PlugIn for Ruby Refactoring

like image 550
Thufir Avatar asked Feb 05 '26 03:02

Thufir


1 Answers

Geany allows this to be handled by external tools, for example astyle. Go to Edit->Format->Send Selection to->Set Custom Commands to set external tools up and play with astyle --style=gnu -FpPn, sort and others. As long as the script mentioned above is able to be ran from the command line, I guess it will also be possible to set it up as such an external tool.

For ruby in particular, you can use rbeautify.

like image 64
Dominic Hopf Avatar answered Feb 06 '26 17:02

Dominic Hopf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!