If in insert mode I do Ctrl+v and then press Alt+j, I see ^[j inserted, with ^[ being actually a single character.
That's the same I get if I press Escape followed by j instead of Alt+j.
I've known that for a long while, but never really understood if it's possible to overcome the undesirable consequences of that.
For instance, if I wanted to map they Alt+j combo above to something, I'd do
nnoremap ^[j something
or more readably
set <A-j>=^[j
nnoremap <A-j> something
but then hitting j right after Escape (which would happen only too often) would have the same effect.
Is there a way to work this "mapping identity" between Escape and Alt?
Is the terminal emulator I use relevant? I use Vim in URxvt.
nnoremap ê rhs(êbeing 0x00ea) would work when I press Alt+j in normal mode, but it doesn't. – Enlico Mar 20 '24 at 16:59