global search and replace

Greg Rundlett greg.rundlett at buzgate.org
Tue May 13 09:41:23 EDT 2003


I am a web developer, so I have large collections of text files (PHP,
HTML, JS, etc.) that often need to be manipulated en-masse.  For the
moment, I'm doing a complete re-design of the application that runs our
website, and I need to effortlessly do text search and replace
operations on thousands of files.

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
HomeSite.

The thing I liked about HomeSite was that it could do the global search
part alone, and display a list of clickable results so that you could
really test out the operation first.  If everything looked hunky-dory,
then you just do the search and replace operation.

It has been so long since I used perl, that I have to dig through my
books and old code snippets even to find and understand the recipes that
I come across.

How do you do this?





More information about the gnhlug-discuss mailing list