Profiling Vim startup time

前端 未结 10 466
孤独总比滥情好
孤独总比滥情好 2020-12-07 07:16

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 it

10条回答
  •  一个人的身影
    2020-12-07 07:38

    If you're loading your plugins from a .vimrc file, what you could do is put a q on some line part way through the file to make it quit so you can use a process timer, like the unix time command. More thoroughly, this would look like:

    1. backup existing .vimrc file
    2. comment out all but a select number of plugins
    3. insert a q line
    4. call time vim repeteadly and average
    5. restore backup

    This is not elegant but I think it will get the job done.

提交回复
热议问题