Skip to content

Instantly share code, notes, and snippets.

@huydx
Created November 3, 2012 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huydx/4007812 to your computer and use it in GitHub Desktop.
Save huydx/4007812 to your computer and use it in GitHub Desktop.
to remap ctrl-c ctrl-s in vim
##.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