Popup history with tmux and fzf
Many times a minute I use the ctrl-r
keyboard shortcut in my terminal to pull up my history. The 80/20 rule states that 80% of the input comes from 20% of the output. Applying that principle to my activity in the terminal means the majority of commands I want to run I
Thankfully fzf wrote a fzf-tmux script that makes it easy to integrate fzf with tmux.
Make sure you have installed the keybindings for your shell (you’ll run something like /usr/local/opt/fzf/install
in macOS). After running that command your <ctrl-r>
command will be bound to your history.
Going one step further, tmux has floating window support. To set your history to popup, add the following variables to your shell.
Here’s how to configure it depending on your shell:
Fish
Bash/Zsh
The -p
flag will now change all fzf_tmux
behavior to pop up instead of creating a separate pane.
I chose to use --reverse
on the ctrl-r
options because I like the way it looks. I also added an optional preview flag bound to ?
as described in the fzf key binding wiki.
I hope you like it! fzf-tmux
with popup support has been a game-changer. I had some hesitations moving away from Visual Studio Code, mostly that tmux and neovim felt outdated when it came to visuals. But now, I’m liking this setup MORE than vscode and am excited to continue to tweak the system to be even more stylish and functional than any other IDE out there.
This is a simple change, but having a polish balanced screen makes all the difference for me, here it is one more time:
Thanks for reading, I will continue to post tips and tricks for how to be more productive in the terminal and macOS.
Sign-Up for New Posts
Stay in the loop and get the latest blog posts about dotfiles sent to your inbox.
Or use the