Skip to content

Instantly share code, notes, and snippets.

@everaldo
Created November 8, 2013 01:55
Show Gist options
  • Save everaldo/7365047 to your computer and use it in GitHub Desktop.
Save everaldo/7365047 to your computer and use it in GitHub Desktop.
Mapping for Ctrl+S to save current buffer on Vim. Adapted from: http://vim.wikia.com/wiki/Map_Ctrl-S_to_save_current_or_new_files
vim()
{
local STTYOPTS="$(stty --save)"
stty stop '' -ixoff
command vim "$@"
stty "$STTYOPTS"
}
inoremap <c-s> <c-o>:update<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment