In vim, how can I map \"save\" (:w
) to ctrl-s.
I am trying \"map\" the command, but xterm freezes when I press ctrl-
alias vim="stty stop '' -ixoff; vim"
Why?, What's happening? See Here, but basically for most terminals ctrl+s is already used for something, so this alias vim so that before we run vim we turn off that mapping.
nmap :w
imap :wa
Why? What's happening? This one should be pretty obvious, we're just mapping ctrl+s to different keystrokes depending on if we are in normal mode or insert mode.