See 5 lines I put in a blank .vimrc for some sensible defaults… my .vimrc is rather a bit longer…
Tag Archives: vimrc
Fixing meta-keys in Vim via Mac OS X Terminal.app
So I configured Terminal.app to use Option (Alt) as Meta key: Terminal => Preferences => Profiles => Keyboard => Use Option as Meta key
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:
let c='a' while c <= 'z' exec "set <M-".tolower(c).">=\e".c exec "imap \e".c." <M-".tolower(c).">" let c = nr2char(1+char2nr(c)) endw
Everything is easy when you know how!