global search and replace

brian lists at karas.net
Tue May 13 10:01:36 EDT 2003


vim supports most standard perl-esque regexp/search and replace type
functions.  You can do global search/replace in vi/vim with something
like:
:X,Ys/this/that/

Search through lines X through Y, replace first this with that

:1,.s/this/that/g

Search from line 1 through current line (specified by '.') replace all
this's with that's.

etc...

On Tue, 2003-05-13 at 09:41, Greg Rundlett wrote:
> I spent the day yesterday upgrading my Quanta Plus install (hoping the
> feature was available in the newest version), and looking online for
> various ways to do a simple text replacement across thousands of files. 
> I know that there are perl scripts that with the proper care will do
> what I want, but why isn't this feature built-in to VIM, Quanta, or
> other editors?  AFAIK, the only editor that does this on Windows is





More information about the gnhlug-discuss mailing list