vim search and replace range in lines code example Example: vim replace between lines :5,12s/foo/bar/g