Vim repeat subsitution
After doing some substitution like
:s/foo/bar
press "n" for next occurrence of "foo" and then press "&" to repeat replacement if necessary.
Written by arminas
Related protips
2 Responses

:%s/foo/bar // start from the top of the file and do them all
:%s/foo/bar/c // start from the top of the file and confirm you want to do it
over 1 year ago
·

Or you can change then all (globally in the file) in one command without confirmation:
:%s/foo/bar/g
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#