6

I'm using Ubuntu 12.04 and gnome-terminal 3.4.1.1, 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.

Waldir Leoncio
  • 1,897
  • 4
  • 29
  • 43
user886596
  • 195
  • 1
  • 6
  • Does [this](http://askubuntu.com/questions/254424/how-can-i-change-what-keys-on-my-keyboard-do-how-can-i-create-custom-keyboard/300203#300203)help? – Mitch Aug 31 '13 at 07:31

1 Answers1

5

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
Zanna
  • 69,223
  • 56
  • 216
  • 327
chaos
  • 27,106
  • 12
  • 74
  • 77