Sebastián Grignoli
Sebastián Grignoli

Reputation: 33432

Way to delay the timeout of key sequences in Vim?

I, like most Vim users, like mapping key combinations for normal mode to increase productivity. They usually start with the leader key.

But when I'm trying new mappings and I'm not yet used to them, I am a little slow at typing them. That little delay between key presses not only makes the sequence fail, it also triggers unwanted commands (for example failing to type the leader, then f leaves me with the f key pressed, so the cursor will jump to the next occurrence of the character I press next).

Is there a way to delay the timeout for key sequences?

I don't know if it's relevant, but

:set updatetime

shows

updatetime=4000

but the leader key effect lasts for a lot less than 4 seconds.

Upvotes: 18

Views: 7014

Answers (1)

romainl
romainl

Reputation: 196506

set updatetime is the time Vim waits until it writes its swapfile to disk when you do nothing (:help updatetime).

The correct setting is set timeoutlen (:help timeoutlen).

Upvotes: 30

Related Questions