> vim-ruby-refactoring – Inline Temp
vim-ruby-refactoring – Inline Temp
This post is part of a series which documents the vim-ruby-refactoring plugin.
Replaces a temporary variable with a direct call to the method or formula.
The refactoring: http://www.refactoring.com/catalog/inlineTemp.html
Move the cursor onto the temp variable (in this case base_price)
Hit your <leader-key> then type rit
The temp variable base_price has been replace with a direct call to the method and we’ve saved a line of code.
rit is the default binding for this refactoring, think Refactor Inline Temp.