DEV Community

Mike Stemle
Mike Stemle

Posted on

It's been a minute, but here's a gist to update your Vim dependencies.

Howdy! It's been a while since I posted anything, so I figured I'd come post something simple and fun.

We all know that updating our system dependencies and our software dependencies is super important for system security, but what about our editor dependencies? That module that you installed for VS Code or Vim or Emacs, what about if security or stability fixes are made?

VS Code solves this problem by having an auto-update capability, and there are several other editors and IDEs which do the same. Unfortunately, those of us who are into the classics (Vim and Emacs are still very widely used) have frequently been left to fend for ourselves.

I've been a Vim user for more than 25 years now (yes, I'm old; it happens), and I use a module manager called "Pathogen" for getting modules running in Vim. It's a pretty common package manager, and almost every module on VimAwesome.com supports it. It's pretty simple, and to install a module with Pathogen all you do is check it out from Git into the ~/.vim/bundles folder. It'll pull the primary branch, and from there once you start Vim the Pathogen package manager sets it up and gives you the functionality.

One of my favorite parts of this is that you can update modules with a simple git pull, but you have to run it in the working director for each of the modules. With a really simple bash script, that's easy to do.

If you're like me, and you have a folder with a bunch of git repos checked out, you can also parameterize the directory that it uses as the base folder and update all of your Git repos in a single command. If you do this, though, make sure you remove the --reset flag as that will wipe out local changed to tracked files.

Anyway, I'm gonna get back to work now. Have a great day.

Latest comments (0)