I installed vim-airline about 2 weeks ago. At that time I read a section in the FAQs about a delay occurring after exiting insert mode and into normal mode. I noticed the delay and applied the fix suggested by adding timeoutlen=50 to my .vimrc. After setting that vim-commentary started to not work. I would issue the command gcc and vim would do nothing until I hit hjkl or an arrow key, at which vim would delete the line and enter insert mode. I also noticed that my maps that used <leader> wouldn't work. Vim would skip a few characters and then enter visual mode.

I narrowed the problem down to the timeoutlen=50. I then set it to timeoutlen=1000 ttimeoutlen=10 and that resolved all the problems. Now, could anyone explain what's going on with vim when timeoutlen is set to a number like 50? Why was I having such weird issues? and why is everything resolved by setting timeoutlen to a much higher number and setting ttimeoutlen? and why did the FAQ suggest 50 when it created these errors?

  • I have installed vim-airline and timeoutlen, ttimeoutlen and esckeys is default (timeoutlen=1000 ttimeoutlen=-1 esckeys timeout nottimeout) and have no any problems, and no delay after exiting insert mode. By the way :he timeoutlen, :he timeout, :he esckeys should explain you I hope.
    – Alex Kroll
    Jul 16, 2015 at 9:29

1 Answer 1


I think this post explains the difference between timeoutlen and ttimeoutlen nicely, especially when used to fix issues with airline/powerline:

Another solution is to use timeoutlen and ttimeoutlen. timeoutlen is used for mapping delays, and ttimeoutlen is used for key code delays. My .vimrc has:

set timeoutlen=1000 ttimeoutlen=0

It might be more reasonable to give ttimeoutlen a more reasonable value, like 10ms, although I have encountered no issues yet.

This is especially nice with vim-powerline, which gives clear visual indication of the current mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.