Vim: Slow when pressing <SHIFT> + O quickly after pressing <ESC>

Created on 18 Aug 2015  路  3Comments  路  Source: vim/vim

What steps will reproduce the problem?
1. Press <ESC> (Very important, not only for leaving any mode)
2. Press <SHIFT> + O
The time between 1. and 2. needs to be short enough.

What is the expected output? What do you see instead?
If, instead of pressing <SHIFT> + O, we press just O, the response is very 
quick as expected. Weirdly, with <SHIFT> + O the response is very slow to come. 
Sometimes, it even print a 'O' and then change its mind end do what's expected 
(i.e. open a line before the current one in INSERT mode)

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2011 07:10:07)


Original issue reported on code.google.com by [email protected] on 25 Sep 2011 at 3:49

Priority-Medium auto-migrated defect

Most helpful comment

On many terminals, <Esc>O (with an uppercase O) is a prefix for several 
keycodes: to see them, do

    :set termcap

in Vim running on the terminal where you experience the problem, and notice 
that several code sequences begin with ^[O where the blue ^[ means Esc.

I recommend the following setting:

    :set timeout timeoutlen=5000 ttimeoutlen=100

where the timeouts are in milliseconds and should be chosen as follows:

timeoutlen: longer than the time it takes you to type successive characters of 
a multi-character mapping or abbreviation at your slowest typing speed, but not 
too much longer than that, to avoid making you impatient when waiting for a 
timeout

ttimeoutlen: shorter than the time it takes you to hit successive keys at your 
fastest typing speed, but longer that the maximum time between successive bytes 
sent by the keyboard driver for a single (special) key.

See
    :help 'timeout'
    :help 'timeoutlen'

Original comment by [email protected] on 25 Sep 2011 at 5:32

All 3 comments

On many terminals, <Esc>O (with an uppercase O) is a prefix for several 
keycodes: to see them, do

    :set termcap

in Vim running on the terminal where you experience the problem, and notice 
that several code sequences begin with ^[O where the blue ^[ means Esc.

I recommend the following setting:

    :set timeout timeoutlen=5000 ttimeoutlen=100

where the timeouts are in milliseconds and should be chosen as follows:

timeoutlen: longer than the time it takes you to type successive characters of 
a multi-character mapping or abbreviation at your slowest typing speed, but not 
too much longer than that, to avoid making you impatient when waiting for a 
timeout

ttimeoutlen: shorter than the time it takes you to hit successive keys at your 
fastest typing speed, but longer that the maximum time between successive bytes 
sent by the keyboard driver for a single (special) key.

See
    :help 'timeout'
    :help 'timeoutlen'

Original comment by [email protected] on 25 Sep 2011 at 5:32

Thanks, I was hoping I would be helpful but I'm the only one who learned 
finally...

Original comment by [email protected] on 25 Sep 2011 at 6:00

Original comment by [email protected] on 25 Sep 2011 at 7:46

  • Changed state: WontFix
Was this page helpful?
0 / 5 - 0 ratings

Related issues

barlik picture barlik  路  4Comments

SRGOM picture SRGOM  路  4Comments

mgedmin picture mgedmin  路  5Comments

pangchol picture pangchol  路  3Comments

j0ker70 picture j0ker70  路  3Comments