3

After a press the prefix Ctrl+B in tmux, if I press multiple keys rapidly one after the other, they are registered as tmux commands. For example, if I press Ctrl+B, Down, Down, it will go down two panes.

However, this interfere with Bash history so if I press Ctrl+B, Down, and then Up again to bring up the last typed command, it's going to go back to the previous pane instead. So I need to press Ctrl+B, Down, wait for a second or two, then Up.

How can I disable this behaviour? Basically I'd like tmux to register the keypress after Ctrl+B but not the ones after that. Any idea if it can be done?

1 Answer 1

6

The repeat-time option, at 500 milliseconds by default, controls how long to wait for the same command key, provided that key has been bound with bind-key -r option, which is the case for things like Down:

bind-key -r    Down select-pane -D

So you can either reduce the time or redo the bindings without -r

set-option -g repeat-time 10
# or
bind-key      Up select-pane -U
bind-key    Down select-pane -D
bind-key    Left select-pane -L
bind-key   Right select-pane -R
bind-key    M-Up resize-pane -U 5
bind-key  M-Down resize-pane -D 5
bind-key  M-Left resize-pane -L 5
bind-key M-Right resize-pane -R 5
bind-key    C-Up resize-pane -U
bind-key  C-Down resize-pane -D
bind-key  C-Left resize-pane -L
bind-key C-Right resize-pane -R
1
  • Thank you so much for the config, that's perfect. I've ended up using your second option (rebinding the arrow keys).
    – laurent
    Jun 22, 2017 at 19:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .