Open nhwCoder opened 1 day ago
Thank you for the code sample
Seems counter-intuitive to me, showing more results than I would expect and have to sift through. TBH, I never really liked it in VSCode either. Just because it's been done doesn't mean it's the right thing to do (for the majority of people). I may include it but make it an option to disable/enable.
Hi Steven
To have an option "Search mode" with "incremental match" vs. "exact match" would be best/great.
BUT its not about like/dislike ==> DE-FACTO every other command palette has this implemented, so to have an option to configure would be great.
-- PS: >TBH, I never really liked it in VSCode either. e.g. in your above example you get same as "exact string match" first and below more...
First I hated this search, step by step I had to understand the inner force. e.g. 'the force be with you']© when you type e.g. "a foo" or "atb" and have a lighting-fast broader match
BTW: Visual Studio 2022 uses also "incremental search" for their command palette [Ctrl+Shift+P]
Overview
OneMore provides the great feature "command palette" (thanks for implementing it!).
Every product providing such a command palette (e.g. VSCode, products on Web/macOS/Linux/Windows) implements incremental search instead of strict search for the command palette (have never seen anything different, except OneMore).
Below a description and working C# source code.
PS: Improved & corrected feature request for https://github.com/stevencohn/OneMore/issues/1677
Incremental search - DESCRIPTION
Allows you to find commands even if your input only partially matches the command names Sample entry: ‘Open File Word’ • Match: o • Match: f • Match: w • Match: ofw • Match: open wo • Match: open fi wo etc.
Incremental search - SOURCE CODE (C# source code for NETFramework 4.x console app)
Program.cs
Command.cs
CharacterSearch.cs