0

I'm trying to set the following keybindings to get similar pane navigation as vim. I tried the following in my tmux.conf file, but it ends up just making it so I can't use hjkl at all (even when just normally trying to type on the command line).

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

(https://stackoverflow.com/a/30719312/413254)

Anyone know what I might be doing wrong? I'm in iTerm2 ssh'ing into a Ubuntu box in case that's of any relevance.

3
  • Do built-in tmux commands work? Have you reconfigured (or accidentally removed, if that's even possible) the default prefix key (C-b)? Commented Mar 12, 2018 at 9:54
  • Not that I'm aware of. All the other commands work as I'd expect.
    – loeschg
    Commented Mar 12, 2018 at 15:10
  • I've the same setup and it works for me, would be helpful to have the complete .tmux.conf, it there're maybe something else that interfere with this configuration. (Yes, it's possible to reconfigure the default prefix key with set -g prefix).
    – pfmaggi
    Commented Mar 27, 2018 at 13:30

1 Answer 1

0

Turns out I was making a rookie mistake and just needed to restart the tmux server.

What I was doing:

1 - Added to .tmux.conf

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

2 - created a new tmux session > tmux new -s test

3 - sourced the .tmux-conf > source .tmux.conf.

This is apparently a very wrong way to do things and resulted in the really odd behavior I described in my question where I couldn't use those keys at all.


What I should have done:

1 - Added to .tmux.conf

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

2 - > tmux kill-server

3 - > tmux new -s test

You must log in to answer this question.

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