Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tmux and vim are frozen

Tags:

vim

tmux

I just started using tmux. Running a session with vim. Tried to exchange split buffers in vim. Usually I use Ctrl + w + Ctrl+x. Don't use this combination very often so don't have it mapped to anything else. For some reason my vim session froze. Not sure what happened. I can execute tmux commands and switch between sessions but cannot do anything with vim. My guess is that a keyboard combination mentioned above does something with the session (locks it maybe). Google search didn't reveal any useful results. Does anyone know what I have done with my session and how to unlock it?

Here is my .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 '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
like image 763
flashburn Avatar asked Aug 15 '18 03:08

flashburn


Video Answer


1 Answers

Ctrl+s will freeze a terminal session, hit Ctrl+q when it happens. I've remapped my buttons for split jumping to be SPACE+h/j/k/l because its easier and less likely to hit that annoying freeze command.

like image 70
Stun Brick Avatar answered Sep 22 '22 06:09

Stun Brick