Beacuse pressing Ctrl-S in terminal will performs an 'XOFF' which stops commands from being receiv
ed. (If Ctrl-S freezes your terminal, type Ctrl-Q to get it going again.)
So, we need to disable that first, put below command in .bashrc
stty stop undef
Then, in the vimrc, add below lines
noremap <silent> <C-S> :update<CR> vnoremap <silent> <C-S> <C-C>:update<CR> inoremap <silent> <C-S> <C-O>:update<CR>
It's done. The Ctrl+S has been mapped to :w
References:
-- EOF --
No comments:
Post a Comment