Hello,
This is a feature suggestion from the vim-plug plugin manager.
Allow on-demand loading (lazy loading) of plugins
This can vastly increase env load times for people with lots of plugins.
This is done in vim-plug like this:
" Loaded when clojure file is opened
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
This syntax transfer over well to Vundle.
" Loaded when clojure file is opened
Plugin 'tpope/vim-fireplace', { 'for': 'clojure' }
Since plugins have autoload, and that can be related with autocmd, how this wlll speed up things?
So my understanding is that plugins need to have that built in, so if they don't then this will speed things up. Another point is that a plugin may load for all file types when you only need it for a single one, and loading on the other file types will slow things down. Is that correct?
This is really an important feature. There're so many plugins installed in my computer, but I only want the plugins related to python load when I'm editing python file and js, php, etc. Now I can only load all the plugins no matter what kind of file I'm editing. The result is that the startup time of vim is extremely long.
I recommend switching to vim-plug until this feature is implemented. I have had no issues with it so far, and the API is very similar.
I agree with @Tardis07
Is there a solution to this? I also think it would be great to have this feature.
Most helpful comment
This is really an important feature. There're so many plugins installed in my computer, but I only want the plugins related to python load when I'm editing python file and js, php, etc. Now I can only load all the plugins no matter what kind of file I'm editing. The result is that the startup time of vim is extremely long.