skim 3.3.0 is out, reaching performance parity with fzf and adding many new QoL features

73 points gwynaark 10 comments

skim is a fuzzy finder TUI written in Rust, comparable to fzf.

Since my last post announcing skim v1, a lot has changed:

Performance

In our benchmarks (running a query against 10M items and exiting after the interface stabilizes), we now perform consistently better than fzf while having a lower CPU usage. We improved memory usage by over 30% but still can't reach the impressive optimization level that fzf manages.

Typo-resistant matching

  • Saghen's frizbee that powers the blink.cmp neovim plugin was added as an algorithm, trading a little performance against typo-resistant matching

New CLI flags

  • --normalize normalizes accents & diacritics before matching
  • --cycle makes the item list navigation wrap around
  • --listen/--remote makes it possible to control sk from other processes: run sk --listen to display the UI in one terminal, then echo 'change-query(hello)' | sk --remote in another to control it (use cat | sk --remote for an interactive control)
  • --wrap will wrap long items in the item list, paving the way for future potential multi-line item display

New actions (--bind)

  • set-query to change the input query
  • set-preview-cmd to change the preview command on the fly

SKIM_OPTIONS_FILE

A new SKIM_OPTIONS_FILE environment variable lets you put your long SKIM_DEFAULT_OPTIONS in a separate file if you want to

Preview PTY

The :pty preview window flag will make the preview run in a PTY, paving the way for more interactive preview commands.

Run SKIM_DEFAULT_OPTIONS='--preview "sk" --preview-window ":pty"' sk if you like Inception

Misc cosmetic improvements

  • The catppuccin themes are now built-in
  • The --border options were expanded
  • --selector & --multi-selector let you personalize the item list selector icons

Please don't hesitate to contribute PRs or issues about anything you might want fixed or improved !