Solution

Use the following command for global search & replace in the file:

:%s/search_string/replacement_string/g

This command tells vi to scan all lines in the file for search_string and change it to replacement_string throughout the file in one short.