vi editor replace string code example Example: global find and replace vi :%s/search_string/replacement_string/g