GVIM. How to change certain words that match the pattern?
In normal mode I press +* and VIM highlighs the occurences of the word under cursor. How to change for example 2,4-5 (second, fourth and fifth) words in search results with %s command? I know I ca开发者_如何学JAVAn use %s and to change the searched word in certain lines, but it is not what I need.
Assuming you did a find first, you could use
:%s//replaced/gic
It will ask for each replacement if it needs to be done.
精彩评论