分析 Vim 启动时间 [英] Profiling Vim startup time

查看:33
本文介绍了分析 Vim 启动时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Vim 时启用了很多插件——这些年来我收集了很多插件.我对 Vim 现在启动需要多长时间感到有点受够了,所以我想分析一下它的启动情况,看看我拥有的众多插件中的哪一个是负责的.

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of the many plugins I have are responsible.

有没有办法分析 Vim 的启动或脚本运行情况?理想情况下,我想知道 Vim 在它加载的每个 Vim 脚本中花费了多长时间.

Is there any way to profile Vim’s startup or script-running? Ideally I’d like to know how long Vim spends in each Vim script it loads.

推荐答案

如果您使用的是 Vim 7.2.269 或更高版本,那么您可以使用 --startuptime 选项.

If you're using Vim 7.2.269 or later, then there's the --startuptime option you can use.

vim --startuptime vim.log

来自帮助(vim -h):

--startuptime <file> Write startup timing messages to <file>

这篇关于分析 Vim 启动时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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