如何查看哪些插件使 Vim 变慢? [英] How to see which plugins are making Vim slow?
问题描述
有没有办法分析 Vim 插件?
Is there a way to profile Vim plugins?
当我打开一个大的 .py
时,我的 MacVim 变得越来越慢.我知道我可以取消选择所有插件并一个一个重新选择以检查哪个插件是罪魁祸首,但有没有更快的方法?
My MacVim becomes slower and slower when I open a large .py
. I know I could deselect all plugins and reselect one by one to check which plugin is the culprit, but is there a faster way?
我的 dotvim 在这里:https://github.com/charlax/dotvim
My dotvim is here: https://github.com/charlax/dotvim
推荐答案
你可以使用内置的分析支持:在启动 vim 之后做
You can use built-in profiling support: after launching vim do
:profile start profile.log
:profile func *
:profile file *
" At this point do slow actions
:profile pause
:noautocmd qall!
(不像退出 noautocmd
不是真正需要的,它只是让 vim 退出更快).
(unlike quitting noautocmd
is not really required, it just makes vim quit faster).
注意:在 vim 退出之前,您不会获得有关已删除函数的信息.
Note: you won’t get information about functions there were deleted before vim quit.
这篇关于如何查看哪些插件使 Vim 变慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!