Debian Packaging Policy for Vim
Prev |  | Next

# 3. Packaging of Vim Addons

With the term (Vim) addon we refer to an extension for the Vim editor which is not shipped with the editor itself. Examples of addons which can be frequently found on the Internet are color schemes, syntax and corresponding higlighting definitions for new languages, indentation definitions, generic and filetype-specific plugins, ...

## 3.1. Addon Structure

An addon is usually composed of a set of `.vim` files; other kind of files, for example `.txt` files for documentation purposes, can be provided as well. For instance, the following files compose the vcscommand addon, providing plugins, syntax higlighting definitions, and documentation:

Example 1. Files composing the vcscommand addon

    doc/tags
    doc/vcscommand.txt
    plugin/vcsbzr.vim
    plugin/vcscommand.vim
    plugin/vcscvs.vim
    plugin/vcsgit.vim
    plugin/vcshg.vim
    plugin/vcssvk.vim
    plugin/vcssvn.vim
    syntax/cvsannotate.vim
    syntax/gitannotate.vim
    syntax/hgannotate.vim
    syntax/svkannotate.vim
    syntax/svnannotate.vim
    syntax/vcscommit.vim

For an addon to work properly (and its plugins being automatically loaded by Vim) all its files should be installed under a unique directory which will be added to Vim's pack path. In the example above, if `/usr/share/vim-vcscommand/` is the chosen directory, then `SVNAnnotate.vim` should be installed as `/usr/share/vim-vcscommand/syntax/SVNAnnotate.vim`, `vcssvn.vim` as `/usr/share/vim-vcscommand/plugin/vcssvn.vim`, and so on.

## 3.2. Addon Packages

Each addon should be packaged and distributed in Debian as a separate package. It is recommended that the package is named according to the naming convention vim-`ADDON` where `ADDON` is a name identifying the packaged addon.

Each binary package should contain a single addon installed as an automatic addon. If the addon requires heavy customization or is noticeably intrusive, it may be preferable to install it as an optional addon.

In some cases, it may make sense to aggregate multiple Vim addons in a single Debian package. An example of such a suite is distributed as the vim-scripts package. In such cases, the addons should be installed as optional addons so the user can choose which ones to enable.

Prev | Home | Next
Vim Packaging |  | Tools