Key-specific timeoutlen in vim

Is it possible to set a different timeout depending on the key entered? For example, I have a short timeout to go reassigned <Esc>to jkorjj

set timeoutlen=200

but if I start with <leader>, I would like this timeoutlen to be longer, because I have some mappings that require keystrokes that are not as easy to type as jk.

+4
source share
1 answer

. , , , :inoremap jj <Esc>, , , , , jj. j , :autocmds 'timeoutlen':

:autocmd InsertEnter * set timeoutlen=200
:autocmd InsertLeave * set timeoutlen=1000
+5

All Articles