If you press Ctrl+S in Vim (i.e. because that’s hard-wired for ‘save’) your terminal may lockup, depending on how it’s configured.
If you want to know why, have a read here. If you just want to get on with life, press Ctrl+Q!
Everything is easy when you know how.
So I configured Terminal.app to use Option (Alt) as Meta key: Terminal => Preferences => Profiles => Keyboard => Use Option as Meta key
But wasn’t working for the key-bindings in my .vimrc:
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
So I found this article: Fix meta-keys that break out of Insert mode and ended up with the following snippet for my .vimrc which fixed my Meta-key problem:
while c <= 'z'
exec "set <M-".tolower(c).">=\e".c
exec "imap \e".c." <M-".tolower(c).">"
let c = nr2char(1+char2nr(c))
Everything is easy when you know how!
When you’re at a Unix terminal and your terminal goes screwy, try typing “stty sane” to reset it. Handy!