Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't "map! <C-q> :q <CR> " work in vim?

Tags:

vim

I input :map! <C-q> :q <CR> in command line mode, then return to normal mode, and press ctrl-q, but vim does not quit. Why?

like image 283
river Avatar asked Oct 25 '11 01:10

river


1 Answers

As Johnsyweb suggested, Ctrl-Q does not reach Vim in the first place. This holds for the popular Ctrl-S as well. Both can be fixed by adding

silent !stty -ixon > /dev/null 2>/dev/null

to your .vimrc as it forces these control sequences to reach the application.

like image 182
bitmask Avatar answered Oct 31 '22 22:10

bitmask