When I'm in insert mode, for instance just between the two ls in hello, and press EscapeO (i.e. EscapeShift+o), the opening of the line above is not instantaneous. Specifically I see all this in little time
in the short interval between pressing Escape and Shift+o, I see
- the cursor flashing to the first
l, - and after a very short time jumping back to the second
l,
- the cursor flashing to the first
after I also press Shift+o
- see the upper case
Oprinted on place of the secondl, and - and after a slightly longer time the empty line is created above the line I was editing (and the
lis back).
- see the upper case
The point is that if I start writing right after the Shift+o, i.e. between step 3 and 4, whether the empty line is created depends on what I write. For instance, I write o (lower case) the empty line is not created, and a / is inserted between the two ls.
If I just press Escape I see
- I see the cursor flashing to the first
l, - and immediately jumping back to the second
l, - and, after a slightly longer time, it goes again on the first
l.
I think this has to do with some imap/inoremap-ping which I'm not aware of, or which I simply don't expect to be triggered when hitting EscapeShift+o.
Further info:
:set timeout? ttimeout? timeoutlen? ttimeoutlen? term?
timeout
nottimeout
timeoutlen=1000
ttimeoutlen=-1
term=xterm-256color
In the following screencast I'm using my vimrc, but I observe the same behavior even when I delete it. On the other hand I don't when I lauch Vim via vim -u NONE.

:set timeout? ttimeout? timeoutlen? ttimeoutlen? term?(I suspect you're hitting esc-O fast enough to trigger some kind of decision between an escape sequence and the actual keys) – D. Ben Knoble Nov 22 '20 at 15:25Alt-whatevermappings have the same escape sequence asEscapefollowed bywhatever. I'll add the answer to your question in my question. – Enlico Nov 22 '20 at 15:29<Esc>Ois also special in that it's often the prefix of the escape codes produced by arrow keys (<Esc>OAthrough<Esc>OD) and the first four F-keys (<Esc>OPthrough<Esc>OS.) I think it has more to do with that rather than with theAltsequences. – filbranden Nov 22 '20 at 16:45