MiscellaneousN/A (configuration command)
bind-key
Short form: bind
Bind a key to a command. The key is bound in the prefix table by default.
Synopsis
bash
tmux bind-key [-nr] [-N note] [-T key-table] key command [arguments]Options
| Flag | Description |
|---|---|
| -n | Bind in root table (no prefix needed) |
| -r | Key may repeat |
| -T key-table | Bind in specified table |
| -N note | Add a note for list-keys |
Examples
Bind Prefix+r to reload config
bash
tmux bind r source-file ~/.tmux.confAlt+Left for previous window (no prefix)
bash
tmux bind -n M-Left previous-windowBind | for horizontal split
bash
tmux bind | split-window -hRepeatable resize binding
bash
tmux bind -r H resize-pane -L 5Default Keybinding
N/A (configuration command)
Default prefix is Ctrl+b
Pro Tips
- •Put bindings in .tmux.conf to persist across sessions
- •Use -n for bindings that don't require the prefix key
- •-r allows holding the key for repeated actions (useful for resize)