This post is part of a series which documents the vim-ruby-refactoring plugin.
Extracts a visual selection into a local variable.
The refactoring: http://www.refactoring.com/catalog/introduceExplainingVariable.html
Visually select the value you wish to extract
Hit your **** then type **relv
**You will now see a prompt to enter the variable name:
Variable name: mac_os
The value platform.upcase.include?(‘MAC’) has been extracted into a local variable mac_os.
relv is the default binding for this refactoring, think Refactor Extract Local Variable.