There is a phrase that I want to look for in Vim. When found, I want to delete that occurrence of the phrase. What is the easiest way to cycle through all the occurrences (via <
The best way is probably to use:
:%s/phrase//gc
c asks for confirmation before each deletion. g allows multiple replacements to occur on the same line.
c
g
You can also just search using /phrase, select the next match with gn, and delete it with d.
/phrase
gn
d