I'm using Ubuntu 12.04 and gnome-terminal, and I'm trying to map ctrl + s to :update in vim.

I added this to my vimrc: map <C-s> :update<CR>

I also tried adding this to my bashrc: stty -ixon -ixoff

However, the terminal still seems to override my keymapping.

up vote 4 down vote accepted

You can disable Ctrl-S in a terminal by:

stty stop undef

You can put this line in your ~/.bashrc file to make the change permanent. You can also reenable Ctrl-S with:

stty stop ^s

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.