Skip to content

Delay changing line numbers after exiting Insert Mode #54

@superjamie

Description

@superjamie

tl;dr - This isn't your fault, and I come bearing multiple solutions.

After hitting Esc to exit Insert Mode, my Vim/Neovim would wait a second or so before setting line numbers back to relative. This was really annoying and broke the workflow of quick responsive changes.

After a lot of debugging, I found this was caused by another binding I had which started with <Esc>. Vim was waiting for the timeoutlen to see if I'd hit anything else after I hit the Esc key. I didn't more keys so then it ran the mode change which fires with this plugin, hence the delay in changing line numbers.

Users can find keymaps like this with:

:verbose imap <Esc>

Reference: vim/vim#1498 (comment)

The solution for me was to just remove the other <Esc> mapping, I'll pick another key combination for what I had.

Another solution is probably to reduce the timeoutlen to say 50ms like this, though it might make other keybinds harder to hit:

set timeoutlen=50

If you're interested in adding an FAQ section to the readme with things like this, I'm happy to send a PR to save you the effort? There are one or two other things here in Issues over the years which could be in such an FAQ too.

Otherwise, feel free to close this Issue. Discussions aren't enabled on this repo so I didn't see anywhere else to post.

Also, many thanks for your excellent plugin! You've made my Vim experience a lot better. This and hardtime really got me using vertical line motions properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions