tmux 和 vim 被冻结

tmux and vim are frozen

我刚开始使用 tmux。 运行 与 vim 的会话。试图在 vim 中交换拆分缓冲区。通常我使用 Ctrl + w + Ctrl+x .不要经常使用这个组合,所以不要将它映射到其他任何东西。由于某种原因,我的 vim 会话冻结了。不确定发生了什么。我可以执行 tmux 命令并在会话之间切换,但无法使用 vim 执行任何操作。我的猜测是上面提到的键盘组合对会话做了一些事情(可能锁定它)。 Google 搜索没有显示任何有用的结果。有谁知道我对我的会话做了什么以及如何解锁它?

这是我的 .tmux.conf

# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l
set -g default-terminal "screen-256color"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
source-file .lightline.tmux

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Ctrl+s 将冻结终端会话,点击 Ctrl+q 当它发生的时候。我已经将我的拆分跳跃按钮重新映射为 SPACE+h/j /k/l 因为它更容易也不太可能触发烦人的冻结命令。

如果Ctrl+Q失败并且window仍然冻结, <prefix>+: 然后输入 respawn-pane -k 对我有用。