Sublime Forum

Ruby beautifier with unnecessary whitespace removal?

#1

Great editor!

What’s the simplest way to re-indent (beautify / pretty) ruby source code with unnecessary whitespace removal in Sublime Text 2 beta?

I noticed a textmate bundle at github.com/mocoso/code-beautifier.tmbundle

Can somebody post some hint for a new sublime user (and also a new ruby user) to accomplish such goal?

0 Likes

#2

The tmbundle may not work because those are often based on Unix shell scripts whereas Sublime plugins are written in Python. Maybe you can find a command-line pretty-printer, and automate that using a custom command.

0 Likes