Created
November 8, 2013 01:55
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim() | |
{ | |
local STTYOPTS="$(stty --save)" | |
stty stop '' -ixoff | |
command vim "$@" | |
stty "$STTYOPTS" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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