lalitmetkar / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Slow when pressing <SHIFT> + O quickly after pressing <ESC> #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 benoit.l...@gmail.com on 25 Sep 2011 at 3:49

GoogleCodeExporter commented 9 years ago
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 antoine....@gmail.com on 25 Sep 2011 at 5:32

GoogleCodeExporter commented 9 years ago
Thanks, I was hoping I would be helpful but I'm the only one who learned 
finally...

Original comment by benoit.l...@gmail.com on 25 Sep 2011 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by brammool...@gmail.com on 25 Sep 2011 at 7:46