Search&Replace: split into two plugins and use it instead of the "normal" search ?

Alexander Neundorf neundorf at kde.org
Fri Mar 23 20:40:58 UTC 2018


Hi,

On 2018 M03 1, Thu 09:38:34 CET Milian Wolff wrote:
> On Wednesday, February 28, 2018 11:42:00 PM CET Alexander Neundorf wrote:
> > Hi,
> > 
> > the search & replace plugin supports searching in the current file (and in
> > all open files), and it supports searching in files (and projects).
> > Additionally, there is the "normal" search in kate in the current
> > document.
> > This search jumps from one search match to the next and cycles through
> > them. It currently doesn't display how often the search term was found.
> > 
> > The search&replace plugin on the other hand searches "live" in the current
> > document, you immediately see how often the search term was found, and it
> > lists all the matches in a list and you can jump between them.
> > I would prefer if this would be the default search in kate.
> 
> I'm quite used to the existing one and use it a lot and I'm happy with it.

What I'm really missing there is the number of matches found in the current 
file. Many applications (firefox) have that.

> Can't you just change the shortcut to have "Ctrl + F" show the search &
> replace plugin?
> 
> > Additionally, as said before, it supports searching in files.
> > In that mode, personally I don't like the feature that it searches live
> > while typing in the currently open file (I often want to search in a
> > different directory, so searching in the current file is usually useless
> > for me).
> > 
> > So, how about splitting it into two plugins ?
> > One which supports only searching in the current file and in all open
> > files
> > (which would then be just a checkbox instead of a combobox), and which
> > could be used instead of the normal search.
> > 
> > And another one which supports searching in Folders and projects, without
> > the search-while-typing feature.
> 
> To me this doesn't sound like a separate plugin, but a small behavioral
> change, maybe based on some checkbox / setting, in the existing plugin.

well, it's tedious.
I don't want my "quick" searches (i.e. those using Ctrl+F in the current 
document) to mess up/discard my more long-living searches across multiple 
files.
Currently to achieve that, I have to go to the S&R plugin, remember to add a 
new tab, switch to "in current file" mode, search.
When doing this again, I would either again add a new tab, or try to find the 
previous tab again.
And as we've discussed already several times, I don't like the current 
behaviour that the S&R plugin does a search-while-typing in the current 
document in all search modes, i.e. also in "search in files". Usually this is 
completely useless for. Quite often when doing "search in files" my current 
files does not contain what I'm looking for, so it is in most cases pointless 
that I see these search results immediately.

Having the "Search in current file" somehow available as a separate plugin with 
adjusted behaviour would fulfill my wishes :-)

Alex



More information about the KWrite-Devel mailing list