Skip to content

Instantly share code, notes, and snippets.

@EdoardoVignati
Last active August 22, 2019 16:11
Show Gist options
  • Save EdoardoVignati/e5df99757268d01593e24e18ef12f36d to your computer and use it in GitHub Desktop.
Save EdoardoVignati/e5df99757268d01593e24e18ef12f36d to your computer and use it in GitHub Desktop.
Bind CTRL+s to save in vim
## Disable ctrl-s of terminal. Add the folowing line to ~/.bashrc
stty stop undef
## Copy the following lines in ~/.vimrc
nnoremap <c-s> :w<CR>
inoremap <c-s> <Esc>:w<CR>
vnoremap <c-s> <Esc>:w<CR>
## If you don't want to add these lines, remember that you
## can exit from freezed terminal (ctrl-s) using ctrl-q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment