Make window change repeatable.

pull/18/head
Eric Cohen 2015-01-13 13:48:49 +02:00
parent b5a1c2ade5
commit 49e6b094ee
2 changed files with 6 additions and 5 deletions

View File

@ -54,12 +54,13 @@ Inspired by [vim-sensible](https://github.com/tpope/vim-sensible).
### Key bindings
# easier and faster switching between next/prev window
bind C-p previous-window
bind C-n next-window
bind -r C-p previous-window
bind -r C-n next-window
Above bindings enhance the default `prefix + p` and `prefix + n` bindings by
allowing you to hold `Ctrl` and repeat `a + p`/`a + n` (if your prefix is
`C-a`), which is a lot quicker.
`C-a`), which is a lot quicker. They are also repeatable so you can type your
prefix, hold `Ctrl` and continuously type `n` or `p` to move between windows.
# source .tmux.conf as suggested in `man tmux`
bind R source-file '~/.tmux.conf'

View File

@ -149,10 +149,10 @@ main() {
# easier switching between next/prev window
if key_binding_not_set "C-p"; then
tmux bind-key C-p previous-window
tmux bind-key -r C-p previous-window
fi
if key_binding_not_set "C-n"; then
tmux bind-key C-n next-window
tmux bind-key -r C-n next-window
fi
# source `.tmux.conf` file - as suggested in `man tmux`