I'm refactoring some code and I have several occurrences of the same block of code. I want to grab the block (probably in visual mode) and then replace every occurrence of it with a method call that I just defined.
Something like.
Some block
of code
that I
want to refactor
Some block
of code
that I
want to refactor
Some block
of code
that I
want to refactor
Some block
of code
that I
want to refactor
becomes...
method_call(stuff)
method_call(stuff)
method_call(stuff)
method_call(stuff)