Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Way to delay the timeout of key sequences in Vim?

Tags:

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.

like image 378
Sebastián Grignoli Avatar asked Mar 16 '12 21:03

Sebastián Grignoli


1 Answers

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).

like image 137
romainl Avatar answered Nov 15 '22 03:11

romainl