Reputation: 157
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:
stty -ixon
in .bashrc
stty stop undef
in .bashrc
.bashrc
unbind-key C-s
in .tmux.conf
Upvotes: 1
Views: 449
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