I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal listed as "not responding" in Activity Monitor. The spike lasts for 5 to 25 seconds, then the terminal is fine until the next time I exit vim. vim is the only thing that seems to be causing this, so far. This behavior is recent -- this same configuration had been working fine before -- although I have updated vim from homebrew in an attempt to fix the problem.

I'm wondering if there's a network issue somewhere (I'm behind a corporate firewall where the admins change the rules occasionally), or some other interaction betweeen vim and terminal that I'm not accounting for.

  • Why would there be networking between vim and the terminal? Have you tried using any of the profile/debug options to get a look at where the time spike is happening? How are you running/using/quitting vim in this process? Data is the key to solving any performance mystery.
    – D. Ben Knoble
    Sep 17 '19 at 18:26
  • 1
    does this still happen if you disable your vimrc? vim --clean (others)?
    – Lie Ryan
    Sep 18 '19 at 0:47
  • 1
    What is the terminal displaying before and during the hang? If you run Vim with the command vim && echo hi does the hi display immediately after quitting Vim, or does that also cause the hang?
    – Rich
    Sep 18 '19 at 8:36
  • 1
    Behavior remains with vim --clean. Sep 18 '19 at 16:46
  • 1
    Behavior seems to affect only a single terminal window at a time -- if I open another terminal, the other doesn't have the same problem. Sep 18 '19 at 16:51

Your Answer

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

Browse other questions tagged or ask your own question.