如何查看哪些插件使Vim变慢? [英] How to see which plugins are making Vim slow?

查看:127
本文介绍了如何查看哪些插件使Vim变慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我打开一个大的 .py 。我知道我可以取消选择所有插件,然后重新选择一个检查哪个插件是罪魁祸首,但是有更快的方法吗?



我的dotvim在这里: https://github.com/charlax/dotvim

解决方案

您可以使用内置的分析支持:启动vim后执行

 :profile start profile.log 
:个人资料func *
:个人资料文件*
此时执行缓慢的动作
:个人资料暂停
:noautocmd qall!

(不像退出 noautocmd 不是真的需要,只是让vim更快退出) / p>

注意:在vim退出之前,您将无法获取有关已删除的功能的信息。


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 by one to check which plugin is the culprit, but is there a faster way?

My dotvim is here: https://github.com/charlax/dotvim

解决方案

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!

(unlike quitting noautocmd is not really required, it just makes vim quit faster).

Note: you won’t get information about functions there were deleted before vim quit.

这篇关于如何查看哪些插件使Vim变慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆