vi search replace code example
Example 1: search and replace vim
:%s/foo/bar/g
Example 2: vi replace all
:%s/search_string/replacement_string/g
Example 3: linux vim replace all
%s/{the word you want to find}/{word to replaced with }/gc
Example 4: search and replace vim
:6,10s/<search_string>/<replace_string>/g | 14,18&&