[RFC] handling of vim addons

Pierre Habouzit madcoder at debian.org
Tue May 9 06:07:37 UTC 2006


Le Mar 9 Mai 2006 03:11, Stefano Zacchiroli a écrit :
> Here it goes ...
>
> handling of vim add-ons
> =======================

> proposed solution
> -----------------
>
> keep on installing add-ons under /usr/share/vim/addons/ (no changes
> are needed for all packages which ship add-ons), but remove this
> directory from the runtimepath. Adds a directory /var/vim/addons/ to
> the runtimepath and implement a flexible symlink mechanism (a-la
> /etc/init.d/) to selectively enable add-ons.

I'd be more in favor of:
/usr/share/vim/{available,enabled}-addons/ à la apache.

but it's a detail.

> When invoked as 'vim-addons update' (by sysadms), it reads as input
> /etc/vim/addons which lists names of enables add-ons, one per line.
> After invoking it, the symlinks under /var/vim/addons/ are all and
> only those corresponding to the addons listed /etc/vim/addons. This
> kind of invocation is idempotent.
>
> Other 'vim-addons' actions are meant to be used both by sysadms and
> users. Besides providing some query mechanisms (e.g. 'vim-addons
> list'), 'vim-addons' can be invoked to either "enable" or "enable"
> add-ons. When invoked by the sysadm to enable/disable add-ons it
> basically change /etc/vim/addons and re-run 'update-vim-addons' (the
> actual implementation can be smarter than that and only change the
> needed symlinks). When invoked by the user it enables/disables
> add-ons acting on symlinks in the user directory ~/.vim/

those are very good ideas !

> registry format
> ---------------
>
> the registry can be as simple as a set of files installed under
> /usr/share/vim/registry/. We can think about providing a debhelper
> that looks for all files installed under /usr/share/vim/addons/ and
> create the corresponding registry entry installing it in the package
> or something similar.

The most simple solution IMHO is to have the registry files contains all 
the informations needed for the list, info (shows the description), ... 
commands be in /usr/share/vim/addons-available/registry

and to link them from /usr/share/vim/addons-enabled/registry like other 
files they list as well. listing enabled modules is just a matter of 
`ls /usr/share/vim/addons-enabled/registry` and listing disabled 
modules a diff between two ls.

I think it's a great idea.
-- 
·O·  Pierre Habouzit
··O                                                madcoder at debian.org
OOO                                                http://www.madism.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20060509/f3405991/attachment.pgp


More information about the pkg-vim-maintainers mailing list