Global substitute in vi July 18, 2011 Koen Leave a comment To search and replace a string globally in the vi editor, use the following syntax: :%s/search_string/replacement_string/g