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
Enables vim popular keybindings (without the need of prefix
)
C-h
select pane on the leftC-j
select pane below the current oneC-k
select pane aboveC-l
select pane on the right
Resizing panes
prefix + shift + h
resize current pane 5 cells to the leftprefix + shift + j
resize 5 cells in the down directionprefix + shift + k
resize 5 cells in the up directionprefix + shift + l
resize 5 cells to the right
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 + |
split the current pane into two, left and right.prefix + -
split the current pane into two, top and bottom.prefix + \
split current pane full width into two, left and right.prefix + _
split current pane full height into two, top and bottom.
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 right
Installation with Tmux Plugin Manager (recommended)
Add plugin to the list of TPM plugins in .tmux.conf
:
set -g @plugin 'mfandrade/tmux-pain-control'
Hit prefix + I
to fetch the plugin and source it.
You should now have all pain-control
bindings defined.
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:
- sessionist - lightweight tmux utils for switching and creating sessions
- logging - easy logging and screen capturing