Multi-file seach & replace

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jblock
Posts: 2
Joined: Tue Sep 09, 2003 1:33 pm

Multi-file seach & replace

Post by jblock »

I would like to suggest that the Find in Files dialog include a "Replace With" field. There is no way to do a multi-file search & replace without opening every file in Text pad first. For a handful of files it may be ok to do an "open all" after you do a Find in Files. But what if you need to change something in say 400-500 file (not unusual for a large project). You really don't want to open them individually.

If the files are writeable, you should be able to replace every instance of a word, regex, etc in all files in a folder or tree without opening them first. Another way to implement this would be to add a button to the Scope field in the Replace dialog and include a filesystem browser.

If this suggestion has been made before, well, it just goes to show that it's common and really ought to be implemented.

Thank you for considering my suggestion.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Why open them individually?
Just right-click in the search result window and select "Open all"...
jblock
Posts: 2
Joined: Tue Sep 09, 2003 1:33 pm

Post by jblock »

MudGuard wrote:Why open them individually?
Just right-click in the search result window and select "Open all"...
That's a 2-step operation. In my example, you would end up with 400-500 open files. Yuk! For large-scale search & replace, you really want to be able to do this over a directory/folder/tree without opening every file.

I posted this suggestion today because that's exactly what I had to do for a recent project. I opted to write a perl script instead. I have another programmer's editor that supports the find & replace in files feature, but I don't like it as much as TextPad overall. I just want my favorite text editor to have all the features I use regularly.
User avatar
lapega
Posts: 5
Joined: Tue Aug 26, 2003 5:51 pm
Location: Montevideo
Contact:

Post by lapega »

I like the idea.
Yeah, you can open all the files with right click, but...., I'dont wanna to open ALL files in textpad, and don't wanna to save ALL and don't wanna to close ALL, I just wanna Textpad do the job for my, and fast.

Open a Poll, you'll see there's a lot of people that are agree with you,
jblock
User avatar
mike_loux
Posts: 1
Joined: Fri Sep 12, 2003 7:23 pm
Location: Caribou, ME
Contact:

Replace in Files

Post by mike_loux »

I think it's a great idea.

Back when I was doing web work for a living, I used HomeSite for my devel, and one of the nicest things about HomeSite was that I could do a multi-file search and replace. I still did most of my editing in TP, but any time I needed to change something over an entire web site project (like moving a directory or renaming a link), I would use HomeSite. So, yes, by all means, this should be added!

Slainte!
-Mike[/b]
perl -e "for$i(0..124){for(0..10){for($j=0;$j<=$i;$j+=2){print pack(qq{H2},substr(qq{4a75737420416e6f74686572205065726c204861636b65722e2020416c6c20596f75722042617365204172652042656c6f6e6720546f205573204e6f772e},$j,2));}print qq{\r};}}print qq{\n};"
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Guess I had to run this to see what da hell it does... hehhe.. good one...

perl -e "for$i(0..124){for(0..10){for($j=0;$j<=$i;$j+=2){print pack(qq{H2},substr(qq
{4a75737420416e6f74686572205065726c204861636b65722e2020416c6c
20596f75722042617365204172652042656c6f6e6720546f205573204e6f7
72e},$j,2));}print qq{\r};}}print qq{\n};"

The goddam thing works... but it turned this thread into a rope :wink: ---
ARRRRRRRRGGGGHHHHH!!!!!

webM

No sweat Jeffy.. exactly the point I was making,
only that I didnt want to blatantly suggest he change it ... what a sig, phew.
Last edited by webmasta on Sat Sep 13, 2003 2:48 pm, edited 3 times in total.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

mike_loux,

Please change your signature so it doesn't exceed the right side of the screen. :' )

webmasta,

Have you tried to edit your post?
elric
Posts: 17
Joined: Wed Nov 12, 2003 2:40 am
Contact:

would be VERY handy!

Post by elric »

The multi-file search and replace would be a very handy enhancement!
In HDL for example (verilog VHDL...), changing a net name or a module name on a multi-file design, would be eeeeeasy! now, I have to do it file-by-file which is pretty clunky....
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

I think this should be an external tool because:

1. It can be more powerful.
2. It does not impact TP's footprint, size and/or performance.
3. You can choose from lot's of these tools already, take a
look at http://www.orbit.org/replace/ or
http://www.inforapid.de/html/searchreplace.htm
These are both freeware for personal use and if you
try them take care, they are very powerful
.
4. Helios can provide their own tool or reccomend an affiliate
so they can support some integration.

In short, if there's a poll for multi file replace I would wote
for it as an external tool.
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
davidakoontz
Posts: 8
Joined: Thu Nov 13, 2003 8:36 pm
Location: Arkansas USA
Contact:

Post by davidakoontz »

I would like to see this feature added to TextPad. Many times I've said $%&@* come on do the next file - please!

If there becomes an issue in the implementation on how it impacts the total foot print of the app - then it's a decision to be made by the design team.

If implemented well - maybe it would count files and warn the user - "whoa that's way too many files... ya want to abort?"

I like the idea - please add it!

David
PaoloM
Posts: 3
Joined: Thu Jul 31, 2003 2:11 pm
Location: Italy
Contact:

Post by PaoloM »

I agree. I always missed the multi-file search and replace function, and I always wondered why it was never implemented in Textpad while other text editors have it. Switching between editors can be very frustrating.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

This is about multi file replace, I think, try Crtl-F5.
Then I open up and see
the person fumbling here is me
a different way to be
elric
Posts: 17
Joined: Wed Nov 12, 2003 2:40 am
Contact:

Post by elric »

Well,
CNTRL-F5 is for searching multiple files, not replacing the argument in multiple file (unless I am missing simething)
in multipl files.
dove
Posts: 3
Joined: Tue Nov 18, 2003 4:51 am

Post by dove »

Yes, Crtl-F5 is only for searching across multiple files. I would heartily recommend that the replace functionality be introduced in some manner or means, whether it be internal or external. It would be a very valuable addition to textpad, as it with website administration it comes up so often.

In short, its got my vote. And I would err to the side of internal.
I refuse to answer that question on the grounds that I don't know the answer.
-- Douglas Adams
Post Reply