photo of the author

August 7, 2019

Search and replace a word in Vim:


The % indicates to look in all lines of the current file; s is for substitute; \<word\> matches the whole word; and the g is for globally, ie. every occurrence.

Or use gc at the end there, if you want to confirm (c) each change.