Is Skim just bad?

I’ve been struggling with Skim for a while. Maybe I’m misunderstanding how it works.

For a simple query, search_mode = "fuzzy" gives me what I actually wanted as the top match, and the rest of the list looks pretty reasonable:

(Replying to myself because I can’t include two screenshots in a post. What a bizarre limitation.)

With search_mode = "skim", the match I wanted is nowhere to be seen. The rest of the list shares some entries with Fuzzy’s, but looks pretty chaotic:

Similarly, when I query with a prefix like pkgctl db move extra-testing, both modes give me lines starting with that string, but skim seems to produce them in random order while fuzzy gives me the most recent uses first, which is much more useful.

We pretty much just released skim as an experiment, and because a bunch of people suggested it. I’m likely to drop it from a future release, though I have no idea on usage numbers - I’d rather not support multiple fuzzy query engines.

I think if fuzzy works better for you, stick with that - is there any particular reason you tried skim?

No, it was part of a suggested config by someone else.

Is it publicly available? I’d be interested in seeing it if so

No, sorry, it was in a private chat quite some time ago.

Hm, notably, the skim-history-widget from Skim’s key-bindings.zsh works much better and produces a good order for the substring (with the entry I want as top match) and a recency order for a prefix search. I guess there must be something wrong with how Atuin is using Skim.

The implementation of Skim can be found here: atuin/atuin/src/command/client/search/engines/skim.rs at a0231a70950fbec9dcc3403e37066d891d1fc833 · atuinsh/atuin · GitHub

One of the biggest issues with Skim is that it cannot work incrementally on our history DB and has to index the whole thing on startup. Due to this, it really is unlikely to see any more development or focus, and is likely to be deprecated soon.

I’d really just suggest that you stick with fuzzy.

Otherwise, putting

smart_sort = true

in your config might help.