I'm using vim-plug for managing plugins, primarily for its lazy-loading capabilities. This lets me do:
Plug 'Valloric/YouCompleteMe', { 'do': 'python2 ./install.py --clang-completer --gocode-completer --tern-completer', …}
I don't have YCM in all systems where I do have my .vim
present and updated, and sometimes I'm not interested in having it present or installed - Supertab suffices for my needs in these cases, and installing YCM takes too much time, and YCM itself might be too heavyweight.
Now, I can skip the build step, since it is a shell command and I can probably do something like 'do': '[[ -z $INSTALL_YCM ]] && python2 …'
. Can I get vim-plug to skip cloning the YCM plugin altogether? It has a bunch of submodules (and submodules within submodules … it's turtles all the way down), and downloading all that would just be a waste of time and bandwidth.
YCM is just an example. As I add more plugins (I have 17 now, and as I understand, some users have twice as many), I would be interested in skipping plugins on systems where they have no use at all. So, don't focus on YCM.
if some_condition
invim-plug
blocks without problem.a, b
is regular Vim syntax for anything in command arguments, so just seeing the use of a,
made me wonder at first - and then theautocmd
bit made me more nervous.executable
, you can check some other Vim or environmental variable (such as the host name).