
Let’s geek out over Vim once more. So Vundle, the package manager I was using until now, suddenly broke on me. It hasn’t been updated for a long time, so it was bound to happen I guess. Vim now has a plugin/package managing thing built-in, but it still requires manually adding packages to the file system with Git and stuff like that, so… booooring.
I wanted something sweet and sassy I can use from Vim itself, but also use the new package system introduced in Vim 8.
Tadaaaa, here’s Minpac! A minimal package manager using the Vim 8 package system (but you guessed that by now if you read the intro).
So how did I do the transition?
My Vundle setup looked like this:
- I have a
vundle.vim
file, which has all the Vundle initialization code, and adds the plugins. - I source that in my
_vimrc
. - My vim dot files (in
~/vimfiles
) are in a GitHub repo, that I sync between my laptops (work & home mostly)
That’s basically it. I then used to run the VundleUpdate
command if I want to sync and add missing plugins.
So here’s how I switched to Minpac:
- I copied the old Vundle config into a
minpac.vim
file. - Then I renamed all the
Plugin 'author/plugin.vim'
statements tominpac#add('author/plugin.vim')
. Using some:%s
-fu to get that done, of course. - I had to find the repos for all the plugins that I got from Vimscripts directly. Minpac doesn’t support Vimscripts as a source, but I find a dedicated GitHub repo for most. For some old ones, there’s the vim-scripts mirror on GitHub, but that isn’t updated anymore, so your millage may vary.
- Then I sourced the new
minpac.vim
file instead of thevundle.vim file
. - I also had to install Minpac, as instructed in the readme, which basically means cloning the repo to
pack\minpac\opt\minpac
- Now it’s time to restart Vim, and run
call minpac#update()
to get all the packages fresh.
At this point, you can delete the bundle
subfolder in your vimfiles
folder, where Vundle stores the plugins.
The switch was easier than I expected. I also get the impression Minpac is faster than Vundle, which is nice. But that could just be the Vim 8 package system itself, I’m not sure.
So to recap, some observations on Minpac:
- Minpac doesn’t have a search command to find plugins, so you have to find the packages using VimAwesome oslt.
- It can’t work with anything but GitHub repositories, but since most plugins are hosted there, that isn’t a problem, really.
- It’s fast.
- It uses Vim’s built-in package system. I’m hoping this means we’ll get more benefits from this with new Vim versions.
The post vim: switching from vundle to the minpac plugin manager appeared first on n3wjack's blog.