From 49e6b094ee1550af4b4ae81dad8c2a1f84743c8a Mon Sep 17 00:00:00 2001 From: Eric Cohen Date: Tue, 13 Jan 2015 13:48:49 +0200 Subject: [PATCH] Make window change repeatable. --- README.md | 7 ++++--- sensible.tmux | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6448097..cbc51ba 100644 --- a/README.md +++ b/README.md @@ -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' diff --git a/sensible.tmux b/sensible.tmux index c0dd06c..04dc139 100755 --- a/sensible.tmux +++ b/sensible.tmux @@ -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`