4

I'm searching for a way to update all my vim plugins with pathogen. I see this is simple in other package managers like Neobundle or vundle.

Please share a way to update all my plugins without having to use some hacky script that I haven't thought of yet to accomplish this.

1
  • 1
    If, and only if, you insist on not using a plugin manager (as the answers rightly suggest), there is a Linux tool called myrepos that allows you to update multiple repositories at once (you first have to register them once with mr, the just do mr update from your home folder when desired, to update all of them at once). Note that, with Vim 8, you may not even need pathogen at all (see :h packages).
    – VanLaser
    Commented Sep 30, 2016 at 20:32

4 Answers 4

7

pathogen manages the run time path of Vim. It is not the same as vim-plug nor vundle.

The differences between the vim plugin managers has many good answers. :-)

How to use Tim Pope's Pathogen was created by romainl who has a lot of reputation on this site. I hope that helps.


6

Pathogen is not a plugin manager at all. Updating your plugins is your job and the best method depends entirely on how you installed those plugins.

If you want an actual plugin manager, try Neobundle, Vundle, Plug, etc.

2

Pathogen will not manage (update, install, etc.) your plugins for you. You have to do that yourself.

And a good way to do that yourself is to install plugins simply by cloning their Git repos to the ~/.vim/bundle folder. Then you can update them with one-line loops. For example in Bash you could do this:

for i in ~/.vim/bundle/*; do git -C $i pull; done

And on Windows you could do this (assuming Git is in PATH):

for /d %i in (%userprofile%\.vim\bundle\*) do ( git -C "%i" pull )

If your plugins have submodules, you can also add git -C "$i" submodule update --init --recursive after the pull (on Windows change $ to %).

1

As other answers point out, Pathogen manipulates the Vim runtime directories rather than managing plugins.

I use Git to manage changes to my Vim configuration files (living in ~/.vim). Each of my plugins (including Pathogen itself) is installed into ~/.vim/bundle directory as Git sub-modules. This allows me to to use git submodule to pull in all changes from the remote repository.

Change into the repository working directory:

cd ~/.vim

Ensure that each git sub-module has the master branch checked out:

git submodule foreach git checkout master

Ensure that the remote-tracking branch is set to the origin remote:

git branch --set-upstream-to=origin/master master
# git submodule foreach git config branch.master.remote origin

Update each sub-module:

git submodule foreach git pull

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.