:%s/foo/bar/gc
The "gc" will apply the find and replace globally, and ask for confirmation before changing an occurrence of "foo".
:%s/foo/bar/gc
The "gc" will apply the find and replace globally, and ask for confirmation before changing an occurrence of "foo".