replace command in vim editor for all occurrences code example Example: vim replace in selection :'<,'>s/foo/bar/g