When using the search feature in Kate it would be very helpful for Kate to show the total number of matches found as well as the current number of the highlighted match.
If you meant the default search bar in kate, you can already see the total number of matches by using the "Find all" button; you'll have to switch to the advanced search bar, the shortcut if Ctrl+R or by clicking the relevant button on the search bar. As for showing the current match number, I suggest you try setting kate to show the line numbers, IMHO that's more indicative of where a particular match is located in a file, YMMV.
Thank you for pointing out the advanced search bar. IMHO the popup message should also be used on a Ctrl+F search and include the current match number (i.e. "match 1 of 5"). The popup should be shown every time when using the next/previous match button.
I was about to open a feature request for this but found it already existed. I'm all for this, it is something I've missed since I started using KDE software. We can take Firefox's "CTRL+F" search bar as a reference. It shows a label like "1 of 12 matches" in the very search bar itself. I understand there is the "Find all" feature in Kate, but that's not the same thing. What we are requesting here is really just that label on the small & quick CTRL+F bar. I really helps to organize thoughts when editing any kind of text/code/config/script file.
Right, actually the code should already have the number of matches since we have to find the matches to show the scrollbar marks anyway.
There's also the search plugin which has a lot more features including the one you requested. Press Ctrl+shift+F to open it and set the mode to Current File.
*** Bug 448236 has been marked as a duplicate of this bug. ***
*** Bug 426298 has been marked as a duplicate of this bug. ***
I think this is out of scope for Ctrl + F. Firstly, the UI space is limited in Ctrl+F. Also, to find the total no of matches, we have to find all the matches. Ctrl+F works differently, it just stops on first match. We can do this for Ctrl+R though,
Created attachment 175942 [details] attachment-999651-0.html I've seen other UIs be able to show it for Ctrl + F. I'll try to have a look tonight to find some examples and where we can show it for Kate.
(In reply to Waqar Ahmed from comment #8) > I think this is out of scope for Ctrl + F. Firstly, the UI space is limited > in Ctrl+F. Also, to find the total no of matches, we have to find all the > matches. Ctrl+F works differently, it just stops on first match. We can do > this for Ctrl+R though, There is plenty of horizontal space. With Ctrl+R there's also unused space at the bottom between the settings and the next/previous buttons. Most programs these days with some find-in-content functionality show the total number of matches and the index of the current match, and highlight all matches, continuously as you type, without having to click specific buttons buttons. There's no need to automatically ape other programs, but I think this is a case where the nowadays popular UI gets it right and has a convenience benefit with no disadvantage (except I guess if counting all results in a really big file is done in the foreground).
> except I guess if counting all results in a really big file is done in the foreground That part is a little bit important, I routinely use Kate on huge log files 150MB-1GB. I want instant results.
(In reply to Waqar Ahmed from comment #11) > > except I guess if counting all results in a really big file is done in the foreground > > That part is a little bit important, I routinely use Kate on huge log files > 150MB-1GB. I want instant results. Hmm, I thought Kate wasn't very usable with files bigger than a few megabytes anyway, though perhaps that's just if they don't have line breaks (most of the time I open huge files are when I accidentally open a minified js or something like that). Anyway you could just limit the feature based on file size or time taken. Or do it in the background like less does, though I imagine that can get complicated.
Created attachment 175947 [details] attachment-1026703-0.html And Kate can have a sane default of not doing the count on files over x MB or y lines.