I discovered the amazing https://github.com/junegunn/fzf , and realized I could build ⌘-k for the terminal.
I'm not near a keyboard so I can't check my muscle-memory, but isn't cmd-k already bound to clear buffer? I would have gone with cmd-p myself, which matches the same functionality for vscode.
Regardless, tying it to a specific key binding strikes me as a little odd.
Criticism aside, this looks insanely cool and I'll install it first thing when i get to work.
And yep, Cmd-k looks to be clear buffer.. I decided to go with Cmd-k rather than Cmd-P because:
- Cmd-k seems to be the standard most of the world has settled on (Notion, Todoist, Slack, Spotify, etc.)
- I've never used the Cmd-k clear buffer binding personally (I just use `clear`)
- I'm not a big fan of VSC using Cmd-p as "find file", since Cmd-p for me is always "Print"
That said, if you prefer Cmd-P you can use that instead! The fuzzy find functionality is in a Bash function called `cmdk`, and you can bind whatever hotkey you'd like so long as it sends the string `cmdk\n`.