-
-
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
Allow vim-plug to be managed as a plugin #240
Conversation
This is a step towards making vim-plug capable of self-updating.
Have you already read #69? |
Sigh, nope, I missed that @vheon. Terribly obvious in hindsight, should have looked harder. Thanks. Closing. FWIW, I do disagree with the logic in #69. It is far more of a hassle for me to have to pull updates to vim-plug manually. The reason is that every single time I want to do an update to vim-plug, I have to go through the manual process again ("what's that curl invocation again?") and have no easy way to reference what changes I'm pulling. Downloading vim-plug as a clone is far easier (one command, simpler URLs, or no URLs if you use hub), and vim-plug provides a wonderful UI for letting me know what updates I just pulled. |
Final addendum for posterity: I just modified my fork to use a symlink |
What is wrong with for the bootstrap taken directly from the implementation of
after
|
@vheon, thanks for the discussion. First, I version control my homedir repos. There are some dependencies that are delegated to another system such as a platform package manager (apt, homebrew, etc.), vim plugin manager, etc. With vim-plug's current approach, whenever vim-plug is updated I need to add, commit, and push that change into my vimrc repo. It becomes a dependency I have to manage, not something delegated to an external package management system. Second, by not having vim-plug self-update, I no longer get a nice summary of changes. For managed plugins it's trivial to investigate change details via git or GitHub's UI, including browsing associated commits, PRs etc. But with vim-plug's approach I now have to manually peruse the entire diff, with all of the context thrown away. I find that to be a worse UI by a large margin. Post-Vundle plugin managers, vim-plug included, have done a nice job of building a UI around summarizing changes in VCS-managed plugins. I can't imagine why I would want to dodge that, just to maybe avoid a few lines in my vimrc. The shallow clone is a fine idea, tho. Adopting that right now. 👍 |
The idea of X managing X can be familiar to long-time Vundle users, but it's really not a very straightforward idea. (Just to be clear, I used Vundle before I started vim-plug and the decision not to follow the way of its predecessor was not accidental but intentional) Consider you are a Vim user who hasn't used a plugin manager (manually putting stuff into ~/.vim) and does not know the Vim's way of managing its "runtime path". Now the problem is two-fold.
And you really don't need to update vim-plug frequently. The core feature set is hardly changed these days and most updates are minor fixes for non-conventional environments. If it works for you, you can just forget about it. |
-1 I know time is money, but you could always write a script to automate the vim-plug part too right? (By using git clone + symlink obviously.) |
One can argue that it's still possible that we restructure the directory and not tell the users to set up vim-plug like vundle. But see here: |
(@jwhitley) I know your point was you want it to be managed by a package manager of some sort, but as long as you automate updating vim-plug, I think it's fine because vim-plug is relatively stable now as junegunn says. |
@vyp, I get where you're coming from, but I see custom automation as a worse solution than what I did: fork vim-plug and add a symlink from If it were desired as a power-user feature, a symlink could be added as I've done. The symlink would not work on Windows without taking special measures, but they could still use the current method of installing and upgrading vim-plug. |
You still have to update that fork right (pull in updates from this repo), so I meant automating that part? Because while it's still technically "manual" (i.e. does not use a package manager), at least it's automated. Of course, if you already got that covered then don't worry. Not disputing symlinking, it's what I do too. |
I agree that requiring But how about running FYI: I found my way here via the FAQ. Why does it suggest running |
This trivial change allows vim-plug to manage itself, as was commonly possible with Vundle. Using my vim setup as an example:
From
.vim/bootstrap/bundles.vim
:With
plug.vim
moved toautoload/plug.vim
, it's possible to pointrtp
at a clone ofvim-plug
, then load it up viacall plug#begin(...)
. Since it's a clone, git can easily manage it and therefore vim-plug can easily self-update.The rest of the code above is just my own bootstrapping system, included for completeness, which installs the plugin manager (now, vim-plug) and calls
:PlugInstall
if this is the initial run on this system.