I'm using gnome-terminal, which uses 7-bit input. This means Vim's meta/alt keys, e.g. <M-f>
don't work without some extra configuration. I know how to set that up for normal keys, like F, but not for Enter.
When I press Alt+F the terminal sends ^[
F
, where the ^[
is a single Escape byte (\x1b
). I can make <M-f>
usable by doing:
set <F13>=^[f
map <F13> <M-f>
map! <F13> <M-f>
How can I do this for the Enter key (<CR>
)?
set <a-cr>=^[^M
?Alt+Shift+Enter
...Alt+Shift+Enter
as forAlt+Enter
so I won't be able to use<M-S-CR>
, at least not on this terminal. On a more configurable term like Alacritty I can though.