While using vim the editor freezes for about a minute at random moments and while that happens vim uses 100% of one of my cores.
The problem is that I don't want to go through disabling and enabling everything in order to find if there is some plugin causing it. The reason for this is that I want something more optimal than this to understand better how to troubleshoot vim problems. And due to the randomness of the freezes I cannot reproduce the problem, thus when I disable a plugin there is no way for me to know if it fixed the problem.
Is there a fast general way to determine which plugin or .vimrc
command is causing such
problems? Or a way to reproduce the freeze?
I tried attaching to the process when the freeze happened to see if anything some plugin or function occupies the CPU cycles but that didn't helped.
As Vim "unfreezes" itself after some time, it doesn't go into an endless loop or crashes. So, Vim "just" spends an inacceptably long time in some function. You should be able to find out where via profiling. Unfortunately, the default builds don't have this built-in; you need a huge build of Vim; for Windows, you can get such binaries from the Cream project. See :help profiling
.
Also, you can capture a full log of a Vim session with vim -V20vimlog
. When a freeze occurs, quit Vim and inspect the last lines of the log to see what Vim was doing, or monitor the log with tail -f
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With