Vim

From MattWiki
Jump to: navigation, search

find each occurance of 'foo' and replace it with 'bar' without asking for confirmation

:%s/foo/bar/g

find each occurance of 'foo' and replace it with 'bar' asking for confirmation first

:%s/foo/bar/gc