Skip to content

Instantly share code, notes, and snippets.

@jaysw
Created May 16, 2015 01:20
Show Gist options
  • Save jaysw/edc13651ceb5615c7aaa to your computer and use it in GitHub Desktop.
Save jaysw/edc13651ceb5615c7aaa to your computer and use it in GitHub Desktop.
# tricks so that ctrl-s works in vim
alias vim="stty stop '' -ixoff ; vim"
# `Frozing' tty, so after any command terminal settings will be restored
ttyctl -f
# bash
# No ttyctl, so we need to save and then restore terminal settings
vim()
{
local STTYOPTS="$(stty --save)"
stty stop '' -ixoff
command vim "$@"
stty "$STTYOPTS"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment