begriffs / haskell-vim-now

One-line Haskell Vim install
MIT License
988 stars 100 forks source link

Display delay in status bar after switching to Normal mode #224

Closed suzumiyasmith closed 7 years ago

suzumiyasmith commented 7 years ago

It needs approximately 1s for status bar changing from blue to yellow after pressing <escape> button. If press any key immediately after quitting Insert mode, the status bar will change to yellow at no time.

I fail to configuring out why this happens. I would be appreciated if someone could provide some advice.

begriffs commented 7 years ago

Might be related to vim's timeout as it waits for possible character mappings to be typed. Try :help ttimeout and see if adjusting it makes a difference.

suzumiyasmith commented 7 years ago

Setting ttimeout on or off doesn't change anything, or literally, 1 second display delay still exist. I reckon it may abuse to plugin showing colourful state bar.

begriffs commented 7 years ago

https://github.com/vim-airline/vim-airline/issues/124 suggests that this happens when we have keybindings which start with <esc>, but I don't think that applies.

https://github.com/vim-airline/vim-airline/issues/1199 says that using neovim will fix the problem, and haskell-vim-now does support neovim as well.

suzumiyasmith commented 7 years ago

Yes, Haskell-vim-now doesn't have key binding with <esc>. I think it may due to the mechanism of vim interacting with the terminal emulator. Gvim works well for me now. Thank you.

begriffs commented 7 years ago

OK, I'll close this issue.

Wish we knew how to fix it for the terminal vim but at least the delay disappears if you type anything rather than preventing you from typing.