-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
don't error out early, if git not exists #392
Conversation
Even if git is not available, one can still use plug.vim for managing the runtime path. This allows, to share the same config with several vim instances, some of which, might not have vim installed (or not have it in $PATH). The commands `:Plug` and `:PlugClean` seem to be safe even in this case. Unfortunately in that case, plug.vim errors out on every start. So let's just move the check for the existance of git to the place, where it is actually needed. In theory, we can also just move the check `:if excutable('git')` around the definition of the all commands that need git, so they would be only defined on systems that have git installed. But I actually like the way, how the commands will always be defined, but they error out once one tries to execute them.
Can't you do it using vim-plug as it is right now? All you get is an error (IMHO the message is not correct but that is another matter)
If a user don't want to see the error can he just use
I believe that is a personal preference. I prefer not to have the command if I can't run it (like vim-fugitive for example) |
If you I prefer the current approach in that
Having crippled commands available or not is just a matter of preference as @vheon pointed out and thus I don't see a good reason to suddenly change our decision at this point. I can understand that you prefer the other way though. And I'm closing this but, I think we have to mention |
On Mi, 27 Jan 2016, Junegunn Choi wrote:
I don't like this solution for various resons:
let git=executable('git')
exe printf("%s%s", git?'':'sil!', "call plug#begin('~/.vim/bundle')") or to always unconditionally use
I see it differently. The plugin defines the commands as its interfaces, With the approach I suggested, you will always know exactly, why the
Oh, I didn't notice. It seemed to work fine from my test of a vim
You are closing my issues too fast for my taste and i am slowly getting |
You have a point, but
Now you can, thanks to the updated message.
I appreciate your suggestions and feedbacks, but you see, vim-plug has been around for more than two years by now and most of the points you make are extensively discussed and concluded several times in that past, and we know the ups and downs of different approaches. Please don't assume that we mindlessly throw things into this project without proper assessment. I don't see a good reason to go all over again and explain to you why we made those choices just because it doesn't fit your taste. And your patch didn't even work. |
On Mi, 27 Jan 2016, Junegunn Choi wrote:
Until you forgot about :sil! and much later wonder why :PlugInstall does
I am not sure, what argument are you making here. I have been around for Also I am not sure why you are saying my patch did not work. It did, |
I'm saying what you're proposing are not new to us, thus fast feedback was possible which most people appreciate. In your patch, |
Even if git is not available, one can still use plug.vim
for managing the runtime path.
This allows, to share the same config with several vim instances, some
of which, might not have vim installed (or not have it in $PATH). The
commands
:Plug
and:PlugClean
seem to be safe even in this case.Unfortunately in that case, plug.vim errors out on every start.
So let's just move the check for the existance of git to the place,
where it is actually needed.
In theory, we can also just move the check
:if excutable('git')
aroundthe definition of the all commands that need git, so they would be only
defined on systems that have git installed. But I actually like the way,
how the commands will always be defined, but they error out once one
tries to execute them.