Feeds:
Posts
Comments

Posts Tagged ‘VIm’

Vim tip – replace

:%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’ [...]

Read Full Post »