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.
vim ...file..., and when I exit vim the terminal beachballs as soon as I type anything on the keyboard. This does not happen for anything else I run from the terminal. I suspect network because that's what could have changed recently since it's beyond my control.vimis the binary installed by homebrew. I may still blame bash for the problem, but the odd thing is it only affects vim. – Andrew Barnett Sep 17 '19 at 21:09vim --clean(others)? – Lie Ryan Sep 18 '19 at 00:47vim && echo hidoes thehidisplay immediately after quitting Vim, or does that also cause the hang? – Rich Sep 18 '19 at 08:36ps | grep [Vv]imin it while the hang is in progress, what is the output? – Rich Sep 18 '19 at 08:39vim --clean. – Andrew Barnett Sep 18 '19 at 16:46vim && echo hiprints thehiand then beachballs -- so that points to a non-vim issue, I would think. – Andrew Barnett Sep 18 '19 at 16:46bashscript which I have sourced. On the way out of the sourced script, the script does:eval "unset my_var; (exit $my_var)"and it's this part which hangs inexplicably. I've noticed it especially with vim, but possibly it's occurring with other commands in similar situations. When I changed(exit...)toreturn $my_varit seems to have made the problem go away. That shouldn't have made a noticeable difference, but it apparently did. Running bash3.2.57(1)and vim8.1 patch 1-2400. – jrw32982 Dec 13 '19 at 00:46