-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby beautification support #25
Comments
Instead, let's use https://github.com/erniebrodeur/ruby-beautify |
Just an FYI. ruby-beautify is no longer maintained: |
Thanks for the notice @seanbuscay! Any recommendations for alternatives by Ruby developers? |
Not really, in terms of alternatives. It seems for now, it is still good to use. Just looks like if no one picks it up, it may become necessary to change. But, hey PHP_beatifier hasn't been updated for years and it is still used a lot. Here's a list of results from the term: beautify off of RubyGems.org http://rubygems.org/search?utf8=%E2%9C%93&query=beautify Nothing looks any better. |
I didn't know if I should reopen this, or open a new one. I've recently rebuilt the core of ruby-beautify around a much better lexing engine. I've already added a few options and run it against all my code, it works as I would expect it too. You can now pick tabs or spaces as well as the indent count via options. I'm open to suggestions on other methods/ideas, and any bugs found against use cases out there. |
Awesome! Great to see some development, @erniebrodeur. I am not a Ruby developer myself, however I can imagine that Ruby developers using Atom Beautify and Ruby Beautify will be very excited. Let me know if there's anything I should add to Atom Beautify to maximize usage of Ruby Beautify's new features. I don't think Atom Beautify currently supports any options right now: https://github.com/Glavin001/atom-beautify/blob/master/lib/langs/ruby-beautify.coffee |
@Glavin001 Could you tell me how to set spaces as the default indent character for ruby-beautify? |
@huanzhang This is just a makeshift way, but I have created the following ruby script named ARGV = %w(--spaces --indent_count 2) + ARGV
load '/Users/masayuki/.gem/ruby/2.2.0/bin/rbeautify' The real path of the rbeautify can be detected by '$ type -a rbeautify' |
@mh61503891 Seems your solution is more convenient for configuration, but I have just solved this by rebuild ruby-beautify(https://github.com/huanzhang/ruby-beautify/commit/4152fe6bbb37e11386b60daf52318004fa84eb6f). To have spaces as default indention for ruby, I have submit a pull request to ruby-beautify(erniebrodeur/ruby-beautify#15) |
rbeautify is completely messed up, if you try beautify a ruby file with it everything just gets removed inside the file! 👎 |
Could update to using rubocop with the |
See https://github.com/CraigWilliams/BeautifyRuby
The text was updated successfully, but these errors were encountered: