www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/14/19:08:20

Message-ID: <38CEBD63.2892212F@caresystems.com.au>
Date: Wed, 15 Mar 2000 08:29:55 +1000
From: leon <Leon AT caresystems DOT com DOT au>
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com
Subject: Re: search and replace on multiple files
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000314104336 DOT 4944B-100000 AT is>
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> 
> On Tue, 14 Mar 2000, leon wrote:
> 
> > just have discovered a way to do a global search and replace (ie on
> > multiple files) in vim.
> 
> Every decent editor has it.
> 
> > It does however requiers the use of key mappings etc.
> 
> Sorry, I don't understand this part.
> 
> > Was just wondering - if there is some binutil with djgpp distribution
> > which will allow for multifile search and replace.
> 
> I'm not sure I understand what are you trying to accomplish.  Please
> post a real-life example.

	say i have 50 source files and 50 header files - somewhere they use (in
one way or another) a method called "PostUserApplicationToSmile()"  say
now i decide that the more useful name would be "Silly()" - i do not
want to open each file - i just want to use some utility which would go
through a specified directory and automatically search and replace the
needed text in all the files.

	Example in vim (as i got from a newsgroup):
"


Go to the command prompt, and then to the directory containing
the files. do 'vim *.*' (w/o the quotes of course), then map a
key, say, z as ':map z :%s/hello/good by/g<C-v><C-m>:w<C-v><C-
m>:n<C-v><C-m>Z' along with the mapping ':map Z z'

"

notice that this example makes the use of key mappings AND opening of
files into editor - both are rather auxiliary to the intention of mine.

With best regards - Leon.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019