0

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

    1. the cursor flashing to the first l,
    2. and after a very short time jumping back to the second l,
  • after I also press Shift+o

    1. see the upper case O printed on place of the second l, and
    2. and after a slightly longer time the empty line is created above the line I was editing (and the l is back).

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

  1. I see the cursor flashing to the first l,
  2. and immediately jumping back to the second l,
  3. 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.

asciicast

3
  • 1
    What is :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, 2020 at 15:25
  • 1
    I have the same suspicion, also in light of the fact that Alt-whatever mappings have the same escape sequence as Escape followed by whatever. I'll add the answer to your question in my question.
    – Enlico
    Nov 22, 2020 at 15:29
  • <Esc>O is also special in that it's often the prefix of the escape codes produced by arrow keys (<Esc>OA through <Esc>OD) and the first four F-keys (<Esc>OP through <Esc>OS.) I think it has more to do with that rather than with the Alt sequences.
    – filbranden
    Nov 22, 2020 at 16:45

0

Browse other questions tagged or ask your own question.