Block oriented search and replace across multiple files.

Ray Parrish crp at cmc.net
Sun Nov 29 21:33:52 UTC 2009


Andrew Farris wrote:
> On Sat, 2009-11-28 at 10:25 -0800, Ray Parrish wrote:
> [snip]
>   
>> Also, I do not see any indication that Vim can do search, and replace 
>> across multiple files simultaneously, so I'm back to writing my program, 
>> which is coming along nicely.
>>     
>
> Honestly, I use gedit for doing this sort of thing. of you just use the
> 'Find/Replace' tool, you can enter in text that will take up multiple
> lines (or highlight the text you want replaced, then hit the
> 'Find/Replace' button...) I admit it's a little cumbersome for large
> text blocks like you presented in your example, but I use it for small
> test-replaces now and again in .csv files, and in python scripts. (Just
> enter newlines as a \n, and tabs as \t)
>
> Hope that helps!
>   
I use Gedit for all of my coding work, and it does not do multi-document 
search and replace. I'll try a small multi line search, and replace with 
it to see how it does in that respect. It's a moot point anyway, as I 
have finished all but the polishing work on my new Mullti-Document, 
Block Oriented Search and Replace program.

With it I was able to change the order of my style sheet calls on every 
page on my web site all at one go. The script takes five, or six minutes 
to handle a large search, and replace across 70 or so files at once, but 
what can I expect from bash anyway??? 8-) It's a lot faster than the 
several hours it took me to do it by hand before.

My program is GUI enabled thanks to Xdialog, and I will be releasing it 
as open source software on Ray's Links here in the next few days. it 
accepts large blocks of text as search, and replace terms very easily.

Later, Ray Parrish

-- 
The Future of Technology.
http://www.rayslinks.com/The%20Future%20of%20Technology.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com






More information about the ubuntu-users mailing list