Message-ID: <38CEBD63.2892212F@caresystems.com.au> Date: Wed, 15 Mar 2000 08:29:55 +1000 From: leon X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: search and replace on multiple files References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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:w:nZ' 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.