Home > Ruby, vim > vim-ruby-refactoring – Convert Post Conditional

vim-ruby-refactoring – Convert Post Conditional

30 December, 2010

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

Convert Post Conditional

Converts a post conditional expression to a conditional expression.

Example

Before refactoring:

ConvertPostConditional_Before
Move the cursor onto the line which contains the post conditional expression
Hit your <leader-key> then type rcpc

After refactoring:

ConvertPostConditional_After
The post conditional expression is split across 3 lines and converted into a standard if expression.

rcpc is the default binding for this refactoring, think Refactor Convert Post Conditional.

Advertisements
  1. No comments yet.
  1. 30 December, 2010 at 10:40 pm
Comments are closed.
%d bloggers like this: