Binu
Binu

Reputation: 157

vim freezes with C-s within tmux

I have mapped Ctrl-s key to save a file in .vimrc. This was working fine till I just installed tmux. (Note that it was working fine because I had "stty -ixon" set in my .bashrc file).

How can I get the mapping work again when opening vim from tmux window?

What I tried so far without success:

  1. Added stty -ixon in .bashrc
  2. Added stty stop undef in .bashrc
  3. Added both 1 and 2 in .bashrc
  4. Added unbind-key C-s in .tmux.conf

Upvotes: 1

Views: 449

Answers (1)

Binu
Binu

Reputation: 157

Thanks @jeremysprofile for the suggestion. Here is the solution that fixed my issue for future references:

tmux was working fine outside of vim for C-s. So, instead of opening vim straight by 'tmux new-window -n editor vim', I did 'tmux new-window -n editor bash' and then 'tmux send-keys -t my_sess:editor "vim" C-m'.

The reason above works is because now vim is opened under bash(which invokes the .bashrc prior to calling vim).

Upvotes: 1

Related Questions