Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top