vim-rubyformat : Automatically reformats/beautifies ruby source code
| script karma
Downloaded by 1798
Comments, bugs, improvements
script versions (upload new version)
vim-rubyformat is a simple vim plugin, that automatically reformats/beautifies ruby code, either when a ruby file is saved or when ff is pressed whilst in normal mode.
Step 1. In any .rb (ruby) file, when save is called, the RubyFormat() function should automatically be called. It's as simple as that.
Step 2 (Optional). Press ff in normal mode to call the RubyFormat() function.
For other keybindings, simply bind `:call RubyFormat()` to your chosen keybinding in your vimrc file. Example: `nnoremap fm :call RubyFormat()<CR>`
`let g:remove_extra_lines = 2` is the current default, which deletes any extra blank lines more than 2 in a row. Place in vimrc to change the value.
To disable autoformatting on file save, place `let g:rubyformat_on_save = 0` in your vimrc file.
Click on the package to download.
ip used for rating: 220.127.116.11