fuzzy-matching in quickopen...

Alexander Neundorf neundorf at kde.org
Sat Sep 17 10:31:49 BST 2022


On Freitag, 16. September 2022 22:33:36 CEST Waqar Ahmed wrote:
> > Are you sure this is a better behaviour ?
> 
> It doesn't matter. With a single letter one cannot really get very far and
> can't really do much scoring. So I wouldn't waste time on thinking about
> the single typed letter case.
> 
> > which ? I thought that's what quickopen is for, really. At least it was
> 
> until
> a year ago.
> 
> No, that is not what it is for. If it were, it wouldn't even list other
> files at all. Quickopen is for opening files in your project + any already
> open files (which may or may not be in the project)
> 
> And quickopen is two years old by now. It was already there when you were
> making those search/replace patches.

quickopen is much older than that (see e.g. https://github.com/KDE/kate/blob/
21f6e144ac9b11003fec518d2f502548f33fd4b1/kate/katequickopen.cpp[1] ), and there the 
comments say "... get all open documents", later on "insert all project files, if any project 
around", so that was more an added bonus.

> Tab switcher / documents plugin deal with already open files.

What's the tab switcher ? Maybe that's a feature I'm not aware of.
The documents side panel is not quick to use, I have to use the mouse, I have to search 
manually.

> You can try increasing the score of already open files. Maybe it will make
> it better, maybe not. Right now only one point is added, which is probably
> too low. Maybe there is a better way to add this score so that files that
> are a good match + open are ranked better.

Is there a unit test or example for the fuzzy matching somewhere already ?

Thanks
Alex


--------
[1] https://github.com/KDE/kate/blob/21f6e144ac9b11003fec518d2f502548f33fd4b1/kate/
katequickopen.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20220917/1e9040f2/attachment.htm>


More information about the KWrite-Devel mailing list