Often when editing code, I'll select a block in visual mode and do a search and replace over the block. After I make the changes, however, it leaves visual mode. How do a new find and replace over the same selection?
Lets say I want to store a selection of my current method, which goes from lines 25-35. I can create a macro that selects the whole method by typing
I can then get that selection back by typing
Suppose I wanted to replace Goodbye with Hello and the code below was selected:
I would type in
It's simply a combination of vim's regular expressions and visual mode selections. When you select, it should autofill