I read that vim 8 provides it default plugin manager. I upgraded my vim to vim 8.0 and am trying to install the plugin using the method provided in the documentation. youcompleteme plugin github repo recommends using Vundle to install the plugin on mac. Just wondering if it can also be installed using default plugin manager supported in vim 8.0 and how to install it?
1 Answer
mkdir -p ~/.vim/pack/plugins/opt
git clone https://github.com/Valloric/YouCompleteMe ~/.vim/pack/plugins/opt/YouCompleteMe
cd ~/.vim/pack/plugins/opt/YouCompleteMe && git submodule update --init --recursive && ./install.py --all
add following code to your vimrc
execute 'packadd YouCompleteMe'
or execute
packadd YouCompleteMe
when you want to start it.
-
2Did you test this?
packadd foo
looks forpack/*/opt/foo
. See the section immediately before:h pack-add
on how to add a single plugin using packages.– muruCommented Sep 11, 2017 at 6:52 -
Also, the git clone command is not creating YouCompleteMe directory. But it did help anyway.– ndvoCommented Sep 26, 2019 at 1:11
~/.vim/pack/dist/start
if you want it always available, use theopt
folder instead of start if you only need it on demand. (but then you need to execute:packadd YouCompleteMe
whenever you want it to have it loaded). However YouCompleteMe needs some postinstallation script to be run, so you need to do that manually.