begin  quoting Bob La Quey as of Sat, Mar 29, 2008 at 01:52:53PM -0700:
> How does one limit the range of the
> vim multiline substitution command?
> 
> i.e.
> :%s/that/this/
> 
> will do a global substituion of this for that.
> 
> But say I want to limit the substitution to
> say ten lines from the cursor. I tried
> :10s/that/this/
> 
> but it does not work.
> 
> How does one do this?

:s/that/this/10

globally on each line?

:s/that/this/g10

Or you can use line numbers

:11,21s/that/this/

-- 
And then with vim, there's shift-v and move around.
Stewart Stremler


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to