darlal/obsidian-switcher-plus

Feature Request: Recursion on results (narrowing / better fuzzy search).

marblewraith opened this issue · 3 comments

Use case

Say there are 3 notes aliased as note system. Opening "Standard Mode" and searching for for note system returns results for all those like this:

01_07_2023-12_07AM-DarlingEarnest

But there's no way to narrow those results further, that is to say, you can't just keep typing and have it eliminate results / fuzzy match.

Taking the example just shown. Let's say i wanted to match / select the note for PARA, there's no way to do this?

01_07_2023-12_19AM-UsedEmbarrassed

In this case it's trivial, because there's only 3 results. But what if there's dozens or hundreds of results?

Solution

I propose using a delineating character.

As someone who uses the terminal quite a bit, normally i'd suggest pipe (|), as in pipe output through to something else.

However this symbol already has connotations with logical OR for search in general (google, etc), and labelling links for Obsidian [[somelink|alt text]]. And so, would probably be confusing.

Therefore instead i propose using backslash (\), reasons:

  1. Muscle memory is still on the key with pipe char so for terminal users like me, nothing really changes.
  2. It's an escape char usually, so unlike forward slash, probably isn't going to be widely used in alias names for existing vaults.
  3. If Quick Switcher++ needs to do something with tags in future, since they use forward slash, will not conflict.

Using this solution for the example above, the input cases that would need to be accounted for:

  • note system\P
  • note system \P
  • note system\ P
  • note system \ P

This functionality would give Quick Switcher++ significant advantage over the native one.

darlal commented

Thanks for the feature request. There's another feature request, #97, that seems pretty similar to this one, except this example uses alias while the other request uses heading. Please let me know if I've misunderstood this request. Thanks!

Yes. It does appear to be similar.

They want to be able to specify a heading (# create table), then add an additional qualifier (/ mysql) to narrow results to a specific note.

My request is to specify an alias (note system), then add an additional qualifier (\ PARA) to narrow results to a specific note.

Difference in character (forward slash vs backslash) suggests perhaps the delineation char should be user assignable?

Since this appears to be a pattern, perhaps it could be generalized for other modes as well i.e. Bookmarks, Symbols, etc?

darlal commented

Yea, we'd want to make it configurable (within reason), and have it work in the modes that make sense. When you have a moment please upvote #97 with a 👍 to show interest. We'll track it there, and close this request. Thanks!