*rubyrefactoring.txt* Ruby Refactoring Tool for Vim Author: Enrique Comba Riepenhausen *rubyrefactoring-author* INTRODUCTION *rubyrefactoring* I love vim! It's my editor of choice when I am developing software. Currently (for the last 4 years at least) I have been working mainly with the Ruby Programming Language. I have been missing a refactoring tool for a while (like the ones you can find in IDE's) while I am developing, but I never had the nerve to dwell into vim script to actually code my own. Recently (a couple of weeks ago) Gary Bernhardt presented his vim configuration in the Software Craftsmanship User Group UK and he showed us the two refactoring patterns he has written in vim script. Initially I just thought "cool", but it didn't really sink in until a couple of weeks later. So now I have decided to code this in vim script, but I am not sure how far I will go with it (clone at your own risk). Enrique Comba Riepenhausen COMMANDS *rubyrefactoring-commands* Implemented commands/patterns: Command Refactoring Notes ~ :RAddParameter Add Parameter :RInlineTemp Inline Temp :RConvertPostConditional Convert Post Conditional :RExtractConstant Extract Constant visual selection :RExtractLet Extract to Let (Rspec) :RExtractLocalVariable Extract Local Variable visual selection :RRenameLocalVariable Rename Local Variable visual selection or variable under cursor :RRenameInstanceVariable Rename Instance Variable visual selection :RExtractMethod Extract Method visual selection NOTE: Rename Instance Variable and Rename Local Variable require matchit.vim MAPPINGS *rubyrefactoring-mappings* Default bindings: :nnoremap rap :RAddParameter :nnoremap rcpc :RConvertPostConditional :nnoremap rel :RExtractLet :vnoremap rec :RExtractConstant :vnoremap relv :RExtractLocalVariable :nnoremap rit :RInlineTemp :vnoremap rrlv :RRenameLocalVariable :vnoremap rriv :RRenameInstanceVariable :vnoremap rem :RExtractMethod Disable default bindings with: > let g:ruby_refactoring_map_keys=0 < ADDITIONAL USAGE EXAMPLES *rubyrefactoring-usageexamples* http://justinram.wordpress.com/2010/12/30/vim-ruby-refactoring-series/