:%s/foo/bar/g = find each occurance of ‘foo’ and replace it with ‘bar’ without asking for confirmation
:%s/foo/bar/gc = find each occurance of ‘foo’ and replace it with ‘bar’ asking for confirmation first
:%s/<foo>/bar/gc = find (match exact word only) and replace each occurance of ‘foo’ with ‘bar’
:%s/foo/bar/gci = find (case insensitive) and replace each occurance of ‘foo’ [...]
Posts Tagged ‘VIm’
Vim tip – replace
Posted in Uncategorized, tagged Tip, VIm on October 5, 2008 | Leave a Comment »