How to see which plugins are making Vim slow?

前端 未结 6 2050
天命终不由人
天命终不由人 2020-11-27 23:48

Is there a way to profile Vim plugins?

My MacVim becomes slower and slower when I open a large .py. I know I could deselect all plugins and reselect one

6条回答
  •  离开以前
    2020-11-28 00:43

    If you're having problems with screen update operations (^L, scrolling, etc) being slow, your problem may be an inefficient syntax highlighting file. You can test this by temporarily disabling syntax highlighting (:syn off) and seeing if the problem goes away; if you want to dig into the details, you can profile the current syntax file using :syntime:

    1. Open a file that causes syntax highlighting performance issues.
    2. Run :syntime on to start profiling.
    3. Scroll through the file a bit.
    4. Run :syntime report to generate a report. The patterns listed first in the report are the ones which took the most time to process.

提交回复
热议问题