Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

fzf is the keybinding i didn't know i needed

How a fuzzy finder bound to a couple of shell shortcuts changed the way I move around the terminal, from history search to jumping into files.

A terminal with a fuzzy file finder overlay open

fzf is a fuzzy finder. You pipe a list into it, type a few characters, and it narrows down interactively. That description undersells it completely, because the moment that changed how I use the terminal was binding it to the keys I already pressed reflexively.

The big one is Ctrl-R. Reverse history search in zsh was always fine, but it only matched contiguous strings and you had to scroll. With fzf's history widget, Ctrl-R pops up the whole history and fuzzy-matches it. I type dock prune, it finds docker system prune -af from three weeks ago, I hit enter. I've stopped half-remembering commands and retyping them.

The second is Ctrl-T, which drops a fuzzy file picker right onto the command line. vim then Ctrl-T, a few letters, and the path I wanted is just there, no ls and no tab-mashing through directories. Pair it with fd as the source and it ignores the junk automatically.

What actually changed wasn't any single command, it was that the cost of finding something dropped to almost nothing. I navigate less and search more, and the terminal feels like it finally remembers things on my behalf. Two keybindings, genuinely transformative. I keep meaning to write up my alt-c directory jump too, but that's a post for another evening.