Debian Packaging Policy for Vim

Debian VIM Maintainers
Version 1.0

Table of Contents
1. Vim Addon Packaging in a Nutshell
2. Vim Packaging
3. Packaging of Vim Addons
3.1. Addon Structure
3.2. Addon Packages
3.3. Registry Entries
4. Tools
A. Vim Registry Entry Examples

1. Vim Addon Packaging in a Nutshell


This section contains a brief howto of what to do to package a Vim addon (plugin, syntax definition, ...) in Debian. This section is not the full policy nor the guidelines for doing that; have a look at the remainder of this document for such information.

So you've found on a cool extra feature for your beloved editor (Vim) and you want it to be packaged in Debian. It's as easy as implementing the following 4 steps:

  1. create an architecture: all .deb binary package called vim-ADDON, where ADDON is the addon name. See Section 3.2 for more info on this.

  2. make your package ship all the files composing your addon (usually .vim and .txt files) under /usr/share/vim/addons/. The files should be shipped as a file and directory tree isomorphic to what you want to see in a runtime Vim directory. So if for example the addon documentation says that something should be installed as plugin/foo.vim then you should ship it as /usr/share/vim/addons/plugin/foo.vim. See Section 3.1 for more info on this.

  3. create a vim-ADDON.yaml registry file for your addon and ship it as /usr/share/vim/registry/vim-ADDON.yaml. You can find documentation on how to write a registry file in Section 3.3 and cut&paste-ready examples in Appendix A. If the addon you are packaging does not provide a way to disable it consider patching it so that it is possible, put in your registry entry the appropriate disabledby field, and forward the patch upstream.

  4. Recommend: vim-addon-manager in your debian/control and write into README.Debian something like:

    Dear user, this package provides the vim addon ADDON, but it is not enable per default. If you want to enable it for your user account just execute vim-addons install ADDON. Similarly, to enable it for all users of this system just execute (as root) vim-addons -w install ADDON. vim-addons is provided by the vim-addon-manager package, have a look at its manpage for more information.

    See Section 4 for more info on this.

That's it! Easy, isn't it?