How can I create a shortcut to resize panes in a tmux window?
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k h l j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).