vi

replace

:s/foo/bar/g Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'.