Pretty Ruby
Use Ruby PP and RuboCop Autocorrect to indent, format and prettify your Ruby code.
Details
Installs
- Total 18K
- Win 5K
- Mac 10K
- Linux 4K
Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
Mac | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
Linux | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Pretty Ruby
Use Ruby PP and RuboCop Autocorrect to indent, format and prettify your Ruby code.
Dependencies:
gem install rubocop
Command Palette
Pretty Ruby: Format pretty_ruby_format
Default Shortcuts
- Linux: ctrl + shift + r + p
["ctrl+shift+r", "ctrl+shift+p"]
- Mac: shift + super + r + p
["shift+super+r", "shift+super+p"]
- Windows: ctrl + shift + r + p
["ctrl+shift+r", "ctrl+shift+p"]
Custom Shortcuts
User/Default (Linux).sublime-keymap
:
{ "keys": ["ctrl+shift+h"], "command": "pretty_ruby_format" }
Custom Ruby/RuboCop path:
User/Preferences.sublime-settings
:
// which ruby
"ruby_path": "/home/user/.rvm/rubies/ruby-2.2.2/bin/ruby",
// which rubocop
"rubocop_path": "/home/user/.rvm/gems/ruby-2.2.2/bin/rubocop"
RuboCop Problem (RVM): executable hooks
/usr/bin/env: ruby_executable_hooks: No such file or directory
Use wrappers
instead of bin
:
User/Preferences.sublime-settings
:
// which rubocop
// "rubocop_path": "/home/user/.rvm/gems/ruby-2.2.2/bin/rubocop" // wrong
"rubocop_path": "/home/user/.rvm/gems/ruby-2.2.2/wrappers/rubocop" // correct
Ruby Problem (RVM): /wrappers/ruby: not found
/bin/sh: 1: /home/user/.rvm/rubies/ruby-2.2.2/wrappers/ruby: not found
Don't use wrappers
for ruby bin.
User/Preferences.sublime-settings
:
// which rubocop
// "ruby_path": "/home/user/.rvm/rubies/ruby-2.2.2/wrappers/ruby" // wrong
"ruby_path": "/home/user/.rvm/rubies/ruby-2.2.2/bin/ruby" // correct