Two Simple Tmux Keybinds that Help Me Everyday
Published on:
I have been using tmux for a while now, but I still need some help. Two keybinds help me day by day.
Helpful Keybinds
They are literally helpful. When I started using tmux I of course didn’t know any keybinds. There is a builtin help menu by using the keybind ?
, but I wanted to level that up.
All the keybinds are listed there, but I can’t search them and manually looking through each one is frustrating. So I made one that is searchable via fzf
.
unbind-key ?
bind-key ? run-shell 'tmux neww -n "help" "tmux list-keys -N | fzf"'
The binding opens a new tmux window with the name help and it lists all the available keybinds and pipes it into fzf. With this I can quickly search for something like “split vertically”.
There is more! I use zimfw
which is like oh-my-zsh
but faster. I discovered that it comes with default aliases. I want to learn those too because Gcm
is faster than git commit --message
. So I made a quick fzf bind for that too.
bind-key a run-shell 'tmux neww -n "aliases" "source ~/.zshrc && alias | fzf"'
Here it’s a good thing to know that by using alias
all the configured aliases are listed to stdout. Also, if you use bash instead of zsh then change .zshrc
to .bashrc
.
Put the upper mentioned two keybinds into your .tmux.conf
and start learning the shortcuts which make your workflow faster!
Previous Part
Simple Directory Watcher to Restart Dev Server
Next Part