Annoying Alt as Meta setting
Annoying alt key and meta behave on different OS and applications.
GUI emacs on Windows:
alt works as meta key, didn’t do much test on msys2 or something.
ArchLinux tty:
alt can be recognised as meta key in some applications(like emacs), in some others it can’t.
| application | work as meta |
|---|---|
| tmux | works as meta and also work with a number like ‘M-1’ |
| emacs | works as meta, also work with number. |
| vim | alt won’t work as meta, alt-h won’t trigger M-h. you have to use execute "set <M-h>=\eh", then map nnoremap <M-h> <C-w>h |
besides, number related binding like execute "set <M-h>=\e1 won’t give you the M-1 binding, it’s just not work in vim. |
MacOS
GUI emacs application: you use Command key as meta key, there is nothing to worry about.
iterm2: you can set the way terminal treat alt in preference, and the following is what it acts like.
| set as | work as meta | behaviour |
|---|---|---|
| normal | no | alt-specificKey will input a specific char, which could be used to do keybinding( even work with number related keybinding: |
map ¡ <M-1> noremap <C-1> 1gt ) in vim. If you want to use number binding in vim this is the choice. |
||
| meta | no respon in terminal | / |
| esc (current) | yes | aligned with archlinux tty, works fine except number key binding in vim. |