It seems to me that the issue you're having is that your plug-in manager is correctly loading the YouCompleteMe plug-in, however it's not working right after being installed by the plug-in manager because the external steps required by YouCompleteMe are not completed yet.
So I'm going to go ahead and strongly recommend you switch from Vundle to vim-plug as a plug-in manager. Not only it's much improved from Vundle (it's faster, more efficient, easier to set up), it also supports post-update hooks that can be used to automate execution of external steps needed to complete installation/update of plugins such as YouCompleteMe.
It might be useful to cover how the plugin managers in this particular family fit together. Pathogen can be considered as the "grandfather" of plugin managers, it was instrumental to define what a plugin layout looks like and to establish updating 'runtimepath'
to list all plugins there. (Some other plugin managers worked by merging files from all plugins into a single tree.) Pathogen only covers that part, it doesn't cover installing or updating plugins.
Vundle came along, embracing the Pathogen model, introducing configuration through vimrc commands (Bundle
, Vundle
or Plugin
) and adding special commands to install, update and otherwise manage the plugins.
vim-plug builds on the Vundle model but uses modern Vim features to speed up operations and make them parallel. It also simplified setup (just download a single file, no need to be ultra careful with filetype commands) and introduced new features, such as post-update hooks. vim-plug is very similar to Vundle, so it should be quite familiar to Vundle users. The command syntax is different (Plug
vs. Plugin
, PlugInstall
vs. PluginInstall
, etc.) but for the most part there's a 1:1 correspondence between them.
The vim-plug wiki has a tip on migrating from other plugin managers which covers Vundle specifically.
The README file mentions YouCompleteMe specifically under post-update hooks, since that's about the canonical example of that (though fzf also comes to mind):
There are some plugins that require extra steps after installation or update. In that case, use do
option to describe the task to be performed.
Plug 'ycm-core/YouCompleteMe', { 'do': './install.py' }
If you need more control, you can pass a reference to a Vim function that takes a single argument.
function! BuildYCM(info)
[...]
endfunction
Plug 'ycm-core/YouCompleteMe', { 'do': function('BuildYCM') }
Both forms of post-update hook are executed inside the directory of the plugin and only run when the repository has changed, but you can force it to run unconditionally with the bang-versions of the commands: PlugInstall!
and PlugUpdate!
.
I believe this should get you covered. In any case (regardless of YouCompleteMe), I really recommend you migrate from Vundle to vim-plug for all the other advantages. But it should nicely cover the YouCompleteMe set up from start to finish.
:PluginInstall
, I have compiled YCM and reopened a new vim. How do I know? Well, all of YCM commands, such as:YCMCompleter
, are not working, just like they don't exist. But if I addedset rtp+=~/.vim/bundle/YouCompleteMe
into the~/.vimrc
. it would work.'rtp'
so what you found on google isn't applicable. Have you read this? github.com/ycm-core/YouCompleteMe/wiki/Full-Installation-Guide And are you intentionally using a fork? I thought official branch was ycm-core/YouCompleteMe