Let’s get down on it assuming you’re using vim-plug as the plugin manager.

Identify the Plugins Taking Long to Load

sh

1
2
3
4
vim --startuptime startuptime.log
# then, quit vim

cat startuptime.log | sort -k2 -r | grep "plugged|$"

Focus on the second column of the output, which is the time spent for loading the plugin sorted in descending order. vim-plug installed plugins should be highlighted, see which one is sucking time.

vim startuptime output

Lazy Loading the Slow Plugins

Depending on the type of the plugin, do one of the following:

1. File Type Specific Plugins

Stop loading it unless the file you’re editing is what it’s targeted by adding {'for': '<file type>'}.

e.g.

.vimrc

1
Plug 'vim-ruby/vim-ruby', {'for': 'ruby'}

2. Command Triggered Plugins

For example ones for commenting out the lines or file explorer kind. If so, get them ignored until executing the command with {'on': '<command>'}.

e.g.

.vimrc

1
2
Plug 'scrooloose/nerdcommenter', {'on': 'NERDCommenterToggle'}
Plug 'scrooloose/nerdtree', { 'on':  ['NERDTreeToggle', 'NERDTreeFind'] }

3. Otherwise

Consider if it’s worth the accumulation of micro delay everytime you open up vim, then disable or let go.

That’s it, if you’re using other vim plugin manager or operating system (Mine’s MacOSX), you might have to tweak commands above a bit.