Tmux plugin for controlling panes. Adds standard pane navigation bindings.
So far, you had to google around and comb other people's dotfiles to find these. This plugin hopefully makes them more available and "more standard".
Thanks to the Tmux community for "inventing" these bindings. I've merely just copied them here.
Tested and working on Linux, OSX and Cygwin.
Notice most of the bindings emulate vim cursor movements.
Navigation
prefix + h
and prefix + C-h
prefix + j
and prefix + C-j
prefix + k
and prefix + C-k
prefix + l
and prefix + C-l
Note: This overrides tmux's default binding for toggling between last
active windows, prefix + l
.
tmux-sensible gives you
a better binding for that, prefix + a
(if your prefix is C-a
).
Resizing panes
prefix + shift + h
prefix + shift + j
prefix + shift + k
prefix + shift + l
These mappings are repeatable
.
The amount of cells to resize can be configured with @pane_resize
option. See
configuration section for the details.
Splitting panes
prefix + |
prefix + -
prefix + \
prefix + _
Newly created pane always has the same path as the original pane.
Swapping windows
prefix + <
- moves current window one position to the leftprefix + >
- moves current window one position to the rightAdd plugin to the list of TPM plugins in .tmux.conf
:
set -g @plugin 'tmux-plugins/tmux-pain-control'
Hit prefix + I
to fetch the plugin and source it.
You should now have all pain-control
bindings defined.
Clone the repo:
$ git clone https://github.com/tmux-plugins/tmux-pain-control ~/clone/path
Add this line to the bottom of .tmux.conf
:
run-shell ~/clone/path/pain_control.tmux
Reload TMUX environment:
# type this in terminal
$ tmux source-file ~/.tmux.conf
You should now have all pain-control
bindings defined.
You can set @pane_resize
Tmux option to choose number of resize cells for the
resize bindings. "5" is the default.
Example:
set-option -g @pane_resize "10"
You might also find these useful: