-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide config to bypass vim autoload #2260
Conversation
Even deferring the autoload to the `VimEnter` stage isn't enough to prevent noticeable slowdown in booting vim. Executing `youcompleteme#Enable()` can still take hundreds of milliseconds even on a modern piece of hardware. This allows users to disable the default autoloading if they wish so that they can execute `youcompleteme#Enable()` at a more appropriate time and get to an editable buffer faster.
Thanks for sending a PR! Could you not just install it in the packages and use In any case this is a new user option, so needs docs in README.md. Review status: 0 of 1 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
I think that this is a fix for a specific way of using plugins in vim which is not the common one. What I see users doing is that users which require lazy-loading plugins generally use either vim-plug or the latest vim feature like Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
Thanks for the PR! If the Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
We already support the Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
Closing this and going with :packadd. Thanks, all! |
I like vim-plug for it's easy upgrade of available packages (and lazy loading). Using the 8.0 :packadd feature gives me only the pathogen-features. So I have to take care of newer versions by hand. |
@Grueslayer You can use vim-plug with YCM without problem, even lazy-loading it. |
This PR addresses some of the user frustration in #2085 and #2071 and is something I've really enjoyed having.
rationale for why I haven't.
actually perform all of these steps.
Why this change is necessary and useful
The current
plugin/youcompleteme.vim
registers the autoload to execute during theVimEnter
stage. But evenVimEnter
must complete before the user can begin editing a buffer. Because of this the YCM vim setup dominates the boot time of even vim configs that leverage dozens of plugins. Executingyoucompleteme#Enable()
can take hundreds of milliseconds even on a modern piece of hardware.This change allows users to disable the default autoloading if they wish so that they can execute
youcompleteme#Enable()
at a more appropriate time and get to an editable buffer faster. It's an advanced user feature, for sure, but I can't think of a better way to allow extremely fast startup time while also using YCM, can you?No automated tests added because the viml doesn't appear to be tested. The change seems to work well, however.
This change is