mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2025-01-06 23:58:56 +00:00
Make window change repeatable.
This commit is contained in:
parent
b5a1c2ade5
commit
49e6b094ee
@ -54,12 +54,13 @@ Inspired by [vim-sensible](https://github.com/tpope/vim-sensible).
|
|||||||
### Key bindings
|
### Key bindings
|
||||||
|
|
||||||
# easier and faster switching between next/prev window
|
# easier and faster switching between next/prev window
|
||||||
bind C-p previous-window
|
bind -r C-p previous-window
|
||||||
bind C-n next-window
|
bind -r C-n next-window
|
||||||
|
|
||||||
Above bindings enhance the default `prefix + p` and `prefix + n` bindings by
|
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
|
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`
|
# source .tmux.conf as suggested in `man tmux`
|
||||||
bind R source-file '~/.tmux.conf'
|
bind R source-file '~/.tmux.conf'
|
||||||
|
@ -149,10 +149,10 @@ main() {
|
|||||||
|
|
||||||
# easier switching between next/prev window
|
# easier switching between next/prev window
|
||||||
if key_binding_not_set "C-p"; then
|
if key_binding_not_set "C-p"; then
|
||||||
tmux bind-key C-p previous-window
|
tmux bind-key -r C-p previous-window
|
||||||
fi
|
fi
|
||||||
if key_binding_not_set "C-n"; then
|
if key_binding_not_set "C-n"; then
|
||||||
tmux bind-key C-n next-window
|
tmux bind-key -r C-n next-window
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# source `.tmux.conf` file - as suggested in `man tmux`
|
# source `.tmux.conf` file - as suggested in `man tmux`
|
||||||
|
Loading…
Reference in New Issue
Block a user