#Both are the same :g/pattern/s/ORIGPATTERN/NEWPATTERN/g :g/pattern/s//NEWPATTERN/g #change delimiter to @ so you can do dirs w/o having to backslash the slashes #from :g/\/some\/dir/s//\/new\/dir/g #to :g@/some/dir@s@@/new/dir@g # # I use marks of 'm' and 'n' normally, since right at the m (mark) key # I also use 'a' and 'b' when I need more ranges, x & y would work well too # whatever system you want, just come up with one so you can easily remember them #set a mark of 'm' mm #goto a mark of 'm' 'm #from mark 'm' to mark 'n', insert a TAB at BOLD 'm,'ns/^/^I&/ #write mark range :'m,'n w myfile #delete from current line to mark 'm' d'm