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?
timeoutlen breaks  and vim-commentary
key bindings;vimrc
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=0It 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.