Bug 45046 - add replace in [open] files feature
Summary: add replace in [open] files feature
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 47647 76617 86312 109079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-12 08:03 UTC by noster
Modified: 2012-10-25 18:47 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description noster 2002-07-12 08:00:48 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kate
Version:           2.0 (using KDE 3.0.2 )
Severity:          wishlist
Installed from:    Debian testing/unstable Packages
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

It would be nice feature to be able to perform replace operation on many files at once. It could work on open files or on files from specified directory.


(Submitted via bugs.kde.org)
Comment 1 Stephan Binner 2002-10-05 18:27:21 UTC
*** Bug 47647 has been marked as a duplicate of this bug. ***
Comment 2 Helge Hielscher 2004-05-02 18:33:51 UTC
The "Project Wide String Replacement" function in KDevelop has this functionality. AFAIK it was written by Jens Dagerbo (jens.dagerbo at swipnet.se).
Maybe it can be adopted for Kate?
Comment 3 Helge Hielscher 2004-05-02 19:32:46 UTC
Another alternative is KFileReplace http://kfilereplace.sourceforge.net 
Comment 4 Sander Devrieze 2004-06-28 12:07:17 UTC
As kfilereplace exists, is this fixed now? Or maybe kate should have kfilereplace integration?
Comment 5 Anders Lund 2004-06-29 08:31:01 UTC
It is possible to pass the list of open files using the new external tools feature, but i haven't kfilereplace, so I haven't added it.
Comment 6 rick stockton 2005-04-16 03:58:39 UTC
Should be restricted to open files only. GUI-wise, add another checkbox "In all files" (disabled when only one file is open).

Check box options "Case sensitive", "Whole words", "Prompt on replace" should be repsected when "In all files" is checked.

I'm not sure whether you need to respect the the "Find backwards" and "From cursor" options when "In all Files" has been checked. I can imagine cases where I might want to exclude the top (or bottom) or the file I'm in, but the documentation would be a headache.

Kate REALLY NEED THIS!!! Thanks.
Comment 7 Andreas Schallenberg 2006-03-14 11:35:48 UTC
These look like duplicates to me:
- Bug 109079: search and replace in a arbitrary list of files
- Bug 76617: Replace in files feature to search/replace all files in project
- Bug 86312: launch file/replace in all open files
Comment 8 Stephan Binner 2006-03-17 16:06:02 UTC
*** Bug 86312 has been marked as a duplicate of this bug. ***
Comment 9 Stephan Binner 2006-03-17 16:06:13 UTC
*** Bug 76617 has been marked as a duplicate of this bug. ***
Comment 10 Stephan Binner 2006-03-17 16:06:19 UTC
*** Bug 109079 has been marked as a duplicate of this bug. ***
Comment 11 Andras Varga 2006-09-15 11:54:07 UTC
Being able to be find/replace in all open files is something crucial and needed very often. How do you guys do refactoring, i.e. rename functions/classes/variables used in several files in a controlled way otherwise...? Doing the replace in the files on the disk is not really convenient, because one often needs to review every replacement, and maybe hand-edit it before saving.

I'm really-really looking forward to this feature being implemented. It would add a big use value to Kate.
Comment 12 dp 2008-06-03 16:10:13 UTC
I like Kate very much but missing the search/replace feature in all open files makes me crazy when I code html.
Comment 13 Andreas Schallenberg 2008-11-09 14:44:42 UTC
Feature not yet available as of now (Kate 2.5.10, KDE 3.5.10).
Comment 14 Eric Thibodeau 2009-05-13 16:49:23 UTC
Well, I'd like to add a case where missing this feature (almost) cost me my thesis. This missing feature means I have to revert to using sed, which is not bad in itself. The problem is that I had written my sed command in a kile command window. Kile has this _feature_ that it automagically changes the WDIR each time you click on one of the opened files. Well, as it had to happen, I was entering the sed replacement command and clicked on a tab to double-check some syntax and the resulting command, merged with the annoyin kile cd insertion, completely wiped all the contents of my TEX files.

Even though I keep daily backups "off site", I still lost 1/2 a day's work...but I can't start imagining the pain of someone _not_ having backups.
Comment 15 Michał D. (Emdek) 2011-12-30 01:52:37 UTC
Isn't such as feature going to be available in KDE 4.8 (according to blog post)?
Comment 16 Dominik Haumann 2011-12-30 10:35:11 UTC
Yes, by using the "Search and Replace" plugin. You can try it already now by following http://kate-editor.org/get-it/

@Kare: This report can be closed, right?
Comment 17 Dominik Haumann 2011-12-30 10:36:30 UTC
One should note, that it is only solved on the application level.

Kile needs to implement it itself. However, They can pretty much copy the code (which is not optimal, but it will work).
Comment 18 Michał D. (Emdek) 2011-12-30 11:30:00 UTC
I've tested that and it looks like it needs some polishing (or maybe I've did something wrong):
- regular find and replace "dialog" can be opened in parallel;
- it would be best if when that plugin is enabled then it would just replace current one (with default mode set to find in file - which currently is not available)

Hope that it is at least partially possible.
Comment 19 Joseph Wenninger 2012-10-25 18:47:37 UTC
This feature should be covered with the "new" "Search & Replace" plugin. If there are things not covered with that plugin, please open a specific bug report explaining the differences between the S&R plugin and the wanted feature.

The separation between S&R in current file and multiple files is deliberately.