Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmux-plugins/tmux-pain-control
standard pane key-bindings for tmux
https://github.com/tmux-plugins/tmux-pain-control
Last synced: 3 months ago
JSON representation
standard pane key-bindings for tmux
- Host: GitHub
- URL: https://github.com/tmux-plugins/tmux-pain-control
- Owner: tmux-plugins
- License: mit
- Created: 2014-05-20T11:45:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T11:01:36.000Z (about 3 years ago)
- Last Synced: 2024-04-12T00:51:12.217Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 129 KB
- Stars: 713
- Watchers: 15
- Forks: 63
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-github-repos - tmux-plugins/tmux-pain-control - standard pane key-bindings for tmux (Shell)
- awesome-tmux - tmux-pain-control - bindings for tmux (Plugins)
README
# Tmux Pain Control
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.
### Bindings
Notice most of the bindings emulate vim cursor movements.
**Navigation**
- `prefix + h` and `prefix + C-h`
select pane on the left
- `prefix + j` and `prefix + C-j`
select pane below the current one
- `prefix + k` and `prefix + C-k`
select pane above
- `prefix + l` and `prefix + C-l`
select pane on the right
**Note**: This overrides tmux's default binding for toggling between last
active windows, `prefix + l`.
[tmux-sensible](https://github.com/tmux-plugins/tmux-sensible) gives you
a better binding for that, `prefix + a` (if your prefix is `C-a`).
**Resizing panes**
- `prefix + shift + h`
resize current pane 5 cells to the left
- `prefix + shift + j`
resize 5 cells in the down direction
- `prefix + shift + k`
resize 5 cells in the up direction
- `prefix + shift + l`
resize 5 cells to the rightThese mappings are `repeatable`.
The amount of cells to resize can be configured with `@pane_resize` option. See
[configuration section](#configuration) 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 left
- `prefix + >` - moves current window one position to the right### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
Add 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.
### Manual Installation
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.confYou should now have all `pain-control` bindings defined.
### Configuration
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"
### Other plugins
You might also find these useful:
- [sessionist](https://github.com/tmux-plugins/tmux-sessionist) - lightweight
tmux utils for switching and creating sessions
- [logging](https://github.com/tmux-plugins/tmux-logging) - easy logging and
screen capturing### License
[MIT](LICENSE.md)