In vim, how can I map \"save\" (:w
) to ctrl-s.
I am trying \"map\" the command, but xterm freezes when I press ctrl-
vim
# ~/.vimrc
nnoremap :w # normal mode: save
inoremap :wl # insert mode: escape to normal and save
vnoremap :w # visual mode: escape to normal and save
zsh (if you use)
# ~/.zshrc
# enable control-s and control-q
stty start undef
stty stop undef
setopt noflowcontrol
bash (if you use)
# ~/.bash_profile or ~/.bashrc
# enable control-s and control-q
stty -ixon