<Space> as my leader key, with a short
let mapleader = ' ' set timeout timeoutlen=300 ttimeoutlen=5
Sometimes in normal mode, I hit
<Space> then hesitate (maybe I changed my mind), letting the timeout expire as I consider my next move.
Normally this would trigger the default
<Space> behavior, moving cursor to the right. To prevent this, I've added:
nnoremap <Space> <Nop>
The problem with this is, after the timeout has expired, I can't reinitiate a leader key-sequence until I run some (any) other command, such as hitting
Esc. It's as if I need to break out of the
<Nop> with some intervening command.
For example, with
nnoremap <leader>j <Plug>(foo),
- I type
<Space>and let the timeout expire
- then I type
<Space>jexpecting it to run
<Plug>(foo), but it does nothing
- I hit
- I type
<Space>j--> Vim runs
If I change my mapleader to
\ and do
map <Space> \, I don't have this problem.
What's causing this timeout/Nop behavior? Is there a way to fix it, or should I use the
This appears to be a known (recent?) bug.