just ram

stuff I should remember

vim-ruby-refactoring - Add Parameter

This post is part of a series which documents the vim-ruby-refactoring plugin.

Add Parameter

Simply adds a parameter (or many separated with commas) to a method.

The refactoring: http://www.refactoring.com/catalog/addParameter.html


Before refactoring:AddParameter_Before
Move your cursor onto the method where you wish to add the parameter
Hit your **** then type **rap **You will now see a prompt to enter the parameter name: Parameter name: **date**

After refactoring:

The contact method now has a date parameter added.

rap is the default binding for this refactoring, think Refactor Add Parameter.

The default **** in vim is the ‘\’ key but you can remap this to any key you like.