On 12/10/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:


I can't type fast enough

I noticed by looking in getchar.c at line 2695 that the timeout
"p_ttm" is a global,
which we can set (in milliseconds) using "set ttimeoutlen <value>"
(see option.c).
So e.g. to set it to three seconds, to give yourself more time to type in the
interactive testcase, we can use:

set ttimeoutlen=3000

I'm beginning to understand the concept described in ":help ttimeoutlen",
apparently it has something to do with defining macro sequences, e.g. if
for some reason I wanted to define a macro called "OK" to string-replace
"ko" with "ok", I'd do something like this:
 :map OK :s/ko/ok/<CR>
Then the command ":map" would show the mapping like this:
  OK            :s/ko/ok/<CR>
To execute the macro, then, I'd type Esc OK. But by default, there
are no macro sequences starting with O, right?

I'm wondering if there's some mistake causing vim to think there's a macro
sequence associated with Esc O, which is causing vim to use the timeout,
whereas pressing O separately immediately inserts a line above?

Apparently, the sequence Esc O is a a little different by default in that
it seems to always incur a one-second timeout, whereas the other keys
which invoke insert mode don't seem to have any timeout: Esc o, Esc A,
Esc i don't have any timeout. Maybe the Esc O timeout is something I just
hadn't noticed before in vi, but it seems new in vim. It happens whether or
not "set nocompatible" is used.

Regards,
Peter.

Reply via email to