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
You could run vim -V
, pipe the output through a utility that adds timestamps and analyze the output. This command lines does this, e.g.:
vim -V 2>&1 | perl -MTime::HiRes=time -ne 'print time, ": ", $_' | tee vilog
You might have to blindly type :q to get back to your prompt. Afterwards, you should find the file vilog
in your current directory with hires timestamps at the beginning of each line.
If you can do with a granularity of a second, you can do this:
vim -V 2>&1 | perl -ne 'print time, ": ", $_' | tee vilog