What I want
To temporarily change the timeout value for certain key commands
Where I've looked
From :help 'timeout'
I have :
The timeout only happens when the 'timeout' and 'ttimeout' options
tell so. A useful setting would be >
:set timeout timeoutlen=3000 ttimeoutlen=100
(time out on mapping after three seconds, time out on key codes after
a tenth of a second).
I'm not sure how I would implement this in a key command though, or how to check the current setting of timeout.
For example, I wanted to try and set hh
to go to the start of a line, but I wanted the timeout for that particular key command to be pretty quick, say 100 milliseconds.
What I've tried
:set timeout timeoutlen=100 ttimeoutlen=100
nmap hh <S-^>
:set timeoutlen=1000 ttimeoutlen=1000
'timeoutlen'
are used at the time that the mapping is invoked, not created.