So, I'm getting into using tmux, coming from GNU screen. Vim is my editor of choice. Often I find it useful to use Ctrl+Z to suspect Vim to get to my shell. I do this in screen easily. There I have my prefix key rebound to Ctrl+Z, so hitting Ctrl+Z+Z sends a SIGSTOP to Vim, and I'm in the shell. A simple "fg" jumps me back, all without leaving screen.
Now, in tmux this does not work for me. I've tried the default Ctrl+B prefix, rebinding to Ctrl+Z and unbinding the z "toggle pane zoom" option in tmux in case that conflicted. The only thing that works is hitting Prefix-Ctrl-Z sends SIGSTOP to tmux, suspending it, but I don't want that. I want the SIGSTOP to go to Vim.
I am on Debian Jessie using i3 as my window manager, and I can't find any conflicting keybindings, so I am open to suggestions on how to get this working.
Thanks.
From the symptoms, it sounds like you may be missing the last line in ~/.tmux.conf
:
unbind C-b
set -g prefix C-z
bind-key z send-prefix
Without it, C-z z doesn't send C-z. This is different than screen
, where escape ^ZZ
performs all these at once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With