Created
November 3, 2012 16:24
-
-
Save huydx/4007812 to your computer and use it in GitHub Desktop.
to remap ctrl-c ctrl-s in vim
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
##.bashrc | |
vim() | |
{ | |
local STTYOPTS="$(stty --save)" | |
stty stop '' -ixoff | |
command vim "$@" | |
stty "$STTYOPTS" | |
} | |
##.vimrc | |
nnoremap <silent> <C-S> :if expand("%") == ""<CR>browse confirm w<CR>else<CR>confirm w<CR>endif<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment