Possible Duplicate:Vim :s replace first N < g occurrences on a line In vi, how do I search and replace a word's first n occurrences with a word, say hello, and the next m occurrences with bonjour, and all the rest with namaste?
Search and replace next n words in vi
vim;vi