尝试在 tmux (hjkl) 中获得类似 vim 的窗格导航

Trying to get vim-like pane navigation in tmux (hjkl)

我正在尝试设置以下键绑定以获得与 vim 类似的窗格导航。我在我的 tmux.conf 文件中尝试了以下内容,但它最终只是成功了所以我根本无法使用 hjkl(即使只是正常尝试在命令行上键入)。

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

()

有人知道我可能做错了什么吗?我在 iTerm2 ssh'ing 进入 Ubuntu 框以防有任何相关性。

原来我犯了一个新手错误,只需要重新启动 tmux 服务器。

我在做什么:

1 - 添加到 .tmux.conf

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

2 - 创建了一个新的 tmux 会话 > tmux new -s test

3 - 来源.tmux-conf > source .tmux.conf.

这显然是一种非常错误的做事方式,并导致我在问题中描述的非常奇怪的行为,我根本无法使用这些键。

我应该做的:

1 - 添加到 .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