[ANN] minpac v1.0: a minimal package manager for Vim 8

319 views
Skip to first unread message

Ken Takata

unread,
Apr 22, 2017, 1:06:44 AM4/22/17
to vim_use
Hi all,

I announce release of minpac ver 1.0.
It is a minimal package manager for Vim 8 (and Neovim).

https://github.com/k-takata/minpac

Minpac utilizes the packages feature of Vim 8, and uses the jobs feature for
parallel install/update. So, it is simple and fast.

Have fun!

Regards,
Ken Takata

Bram Moolenaar

unread,
Apr 22, 2017, 9:18:04 AM4/22/17
to vim...@googlegroups.com, Ken Takata
Thanks for making this.

Some questions pop up when reading the first page:
- Does this only work with git repositories?
- Does it automatically update, or does the user need to execute a
command to update the packages?
- It mentions "start" plugins and "opt" plugins, who makes that choice?
- Is there a list of packages and how to add them?

--
No letters of the alphabet were harmed in the creation of this message.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Ken Takata

unread,
Apr 22, 2017, 10:11:39 AM4/22/17
to vim_use, ktakat...@gmail.com
Hi Bram,

At first, I have to say one thing: minpac is actually a plugin manager using
the packages feature, not a package manager. It cannot download packages and
install them.
(Maybe it's better to fix the document.)


2017/4/22 Sat 22:18:04 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
>
> > I announce release of minpac ver 1.0.
> > It is a minimal package manager for Vim 8 (and Neovim).
> >
> > https://github.com/k-takata/minpac
> >
> > Minpac utilizes the packages feature of Vim 8, and uses the jobs feature for
> > parallel install/update. So, it is simple and fast.
> >
> > Have fun!
>
> Thanks for making this.
>
> Some questions pop up when reading the first page:
> - Does this only work with git repositories?

Yes, minpac supports only git repositories. Nowadays most Vim plugins have
each git repository.
I don't have a plan to support other types of plugins.
I want to keep minpac simple.


> - Does it automatically update, or does the user need to execute a
> command to update the packages?

It doesn't automatically update. If a user want to update plugins,
he need to execute:

call minpac#update()

Minpac doesn't define a command for this, but the user define a command for
this by himself if he want.


> - It mentions "start" plugins and "opt" plugins, who makes that choice?

The user should specify this as an argument of `minpac#add()`.
For "start" plugins:

call minpac#add('account/plugin')
or
call minpac#add('account/plugin', {'type': 'start'})

For "opt" plugins:

call minpac#add('account/plugin', {'type': 'opt'})


> - Is there a list of packages and how to add them?

As I wrote above, minpac actually doesn't manage packages. It only handles
one package, `~/.vim/pack/minpac` by default.

About a list of plugins, the user should register the plugins by `minpac#add()`.
Normally he will write a list in his .vimrc like this:

call minpac#add('account1/plugin1')
call minpac#add('account1/plugin2')
call minpac#add('account2/plugin3')
call minpac#add('https://example.com/account3/plugin4.git')

This is similar to other plugin managers: Vundle, vim-plug, dein.vim, etc.


Regards,
Ken Takata

Yutao Yuan

unread,
Apr 27, 2017, 6:23:12 AM4/27/17
to vim_use
A few months ago I tried to use vim packages to manage plugins, but it
wasn't adding the "after" directories in the correct order, and breaks
several plugins. Is this still the case now?

h_east

unread,
Apr 27, 2017, 8:48:39 AM4/27/17
to vim_use, infmagi...@outlook.com
Hi Yutao,

2017-4-27(Thu) 19:23:12 UTC+9 Yutao Yuan:

About this? Well it's fixed.

Author: Bram Moolenaar <Br...@vim.org>
Date: Sat Aug 6 19:01:55 2016 +0200

patch 7.4.2164
Problem: It is not possible to use plugins in an "after" directory to tune
the behavior of a package.
Solution: First load plugins from non-after directories, then packages and
finally plugins in after directories.
Reset 'loadplugins' before executing --cmd arguments.

--
Best regards,
Hirohito Higashi (h_east)

lith

unread,
Apr 28, 2017, 4:21:48 AM4/28/17
to vim_use, infmagi...@outlook.com
> About this? Well it's fixed.

Not the original author but I ran into similar problems with optional plugins that didn't load files in the after directory properly. Thi soccurred with vim 8.0 since I didn't use the pack feature before. Anyway, I cannot reconstruct the problem exactly because ...

Shameless plug: I wrote autopack[1] to facilitate the loading of optional "pack plugins" which also provides IMHO better support for configuring plugins in packs via before and after scripts (actually packrc/before/PLUGIN.vim and packrc/after/PLUGIN.vim).

Regards


[1] http://www.vim.org/scripts/script.php?script_id=5526
https://github.com/tomtom/autopack_vim

Ken Takata

unread,
Sep 2, 2018, 4:43:56 AM9/2/18
to vim_use
Hi all,

I announce release of minpac v2.0.

https://github.com/k-takata/minpac

This version supports showing the status of plugin update or installation in
a separate window.
I also updated the document and added some useful example commands.

Regards,
Ken Takata

Reply all
Reply to author
Forward
0 new messages