Terminal & CLI
Why is there a delay when cursor changes in Vim?
→ Vim waits for potential escape sequences after you press Escape. Set ttimeoutlen=0 in your .vimrc to reduce this delay.
Answer
Why is there a delay when cursor changes in Vim?
Vim waits for potential escape sequences after you press Escape. Set ttimeoutlen=0 in your .vimrc to reduce this delay.
Vim uses timeoutlen (default 1000ms) for mapping sequences, but terminal key codes use ttimeoutlen. When ttimeoutlen is not set, it inherits from timeoutlen, causing the delay. Setting ttimeoutlen=10 (or 0) separately allows instant mode switching while keeping longer timeouts for custom mappings.