All Projects → ecomba → Vim Ruby Refactoring

ecomba / Vim Ruby Refactoring

Refactoring tool for Ruby in vim!

Labels

Projects that are alternatives of or similar to Vim Ruby Refactoring

Vim Sublime
A ready to use minimal Vim (Sublime Text -like) .vimrc configuration
Stars: ✭ 384 (-23.66%)
Mutual labels:  viml
Vim Ruby Debugger
Vim plugin for debugging Ruby applications (using ruby-debug-ide gem)
Stars: ✭ 434 (-13.72%)
Mutual labels:  viml
Vim Taskwarrior
vim interface for taskwarrior
Stars: ✭ 456 (-9.34%)
Mutual labels:  viml
Yankring.vim
Maintains a history of previous yanks, changes and deletes
Stars: ✭ 391 (-22.27%)
Mutual labels:  viml
Dotvim
lean & mean vim distribution
Stars: ✭ 425 (-15.51%)
Mutual labels:  viml
Vim Bufferline
super simple vim plugin to show the list of buffers in the command bar
Stars: ✭ 448 (-10.93%)
Mutual labels:  viml
Spacegray.vim
A Vim color scheme loosely based on the Spacegray Xcode theme.
Stars: ✭ 366 (-27.24%)
Mutual labels:  viml
Vim Autoclose
This plugin for Vim enable an auto-close chars feature for you. For instance if you type an '(', ``autoclose`` will automatically insert a ')' and put the cursor between than.
Stars: ✭ 497 (-1.19%)
Mutual labels:  viml
Vim Golang
Github mirror of Go vimscripts, synced with main repository
Stars: ✭ 432 (-14.12%)
Mutual labels:  viml
Yunocommit.vim
Y U NO commit after so many writes???
Stars: ✭ 456 (-9.34%)
Mutual labels:  viml
Dbext.vim
Provides database access to many dbms (Oracle, Sybase, Microsoft, MySQL, DBI,..)
Stars: ✭ 397 (-21.07%)
Mutual labels:  viml
Vim Startify
🔗 The fancy start screen for Vim.
Stars: ✭ 4,479 (+790.46%)
Mutual labels:  viml
Wildfire.vim
Smart selection of the closest text object
Stars: ✭ 448 (-10.93%)
Mutual labels:  viml
Todo.txt Vim
Vim plugin for Todo.txt
Stars: ✭ 383 (-23.86%)
Mutual labels:  viml
Vim Es6
List of JavaScript ES6 snippets and syntax highlighting for vim.
Stars: ✭ 465 (-7.55%)
Mutual labels:  viml
Vim Swift
Adds Swift support to vim. It covers syntax, intenting, and more.
Stars: ✭ 373 (-25.84%)
Mutual labels:  viml
Ghcmod Vim
Happy Haskell programming on Vim, powered by ghc-mod
Stars: ✭ 435 (-13.52%)
Mutual labels:  viml
Autoconfig Mac Vimrc
autoconfig mac vimrc with bundle
Stars: ✭ 502 (-0.2%)
Mutual labels:  viml
Kotlin Vim
Kotlin plugin for Vim. Featuring: syntax highlighting, basic indentation, Syntastic support
Stars: ✭ 479 (-4.77%)
Mutual labels:  viml
Vim Seek
Seek makes navigating long lines effortless, acting like f but taking two characters.
Stars: ✭ 452 (-10.14%)
Mutual labels:  viml

Ruby Refactoring Tool for Vim

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).

N.B. 'Rename Local Variable', 'Rename Instance Variable' and 'ExtractMethod' require matchit.vim:

http://www.vim.org/scripts/script.php?script_id=39

Implemented commands/patterns:

: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/variable under the cursor, *REQUIRES matchit.vim*)
:RRenameInstanceVariable - Rename Instance Variable  (visual selection, *REQUIRES matchit.vim*)
:RExtractMethod          - Extract Method            (visual selection, *REQUIRES matchit.vim*)

Default bindings:

:nnoremap <leader>rap  :RAddParameter<cr>
:nnoremap <leader>rcpc :RConvertPostConditional<cr>
:nnoremap <leader>rel  :RExtractLet<cr>
:vnoremap <leader>rec  :RExtractConstant<cr>
:vnoremap <leader>relv :RExtractLocalVariable<cr>
:nnoremap <leader>rit  :RInlineTemp<cr>
:vnoremap <leader>rrlv :RRenameLocalVariable<cr>
:vnoremap <leader>rriv :RRenameInstanceVariable<cr>
:vnoremap <leader>rem  :RExtractMethod<cr>

Additional usage examples (thanks Justin!): http://justinram.wordpress.com/2010/12/30/vim-ruby-refactoring-series/

Documentation

http://relishapp.com/despo/vim-ruby-refactoring

Enrique Comba Riepenhausen & Paul King

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].