tmux not respecting disabled control flow

If you have stty -ixon in your shell's initialization, it's rather simple: when tmux creates new terminals, it runs user's default shell by default and that in turn disables the control flow during the initialization. However, when you ask tmux to run a specific command (ViM in your case), no initialization takes place and the default terminal settings (flow control enabled) apply.

tmux new-session -s foo "stty -ixon; vim"

should fix your problem.


A workaround which does not require changing the tmux call is to include the stty call in the file $HOME/.zshenv. This file is parsed by ZSH and used even for non-interactive shells.

echo 'stty -ixon' | tee -a ~/.zshenv
# ... or ...
echo 'stty -ixon' >> ~/.zshenv

BASH users have to set the environment variable BASH_ENV=$HOME/.zshenv to make this work.