vim-plugin.eclass

Name

vim-plugin.eclass -- used for installing vim plugins

Description

This eclass simplifies installation of app-vim plugins into /usr/share/vim/vimfiles. This is a version-independent directory which is read automatically by vim. The only exception is documentation, for which we make a special case via vim-doc.eclass.

Supported EAPIs

6 7 8

Exported Phases

  • pkg_postrm

  • pkg_postinst

  • src_install

Functions

vim-plugin_src_prepare

Moves "after/syntax" plugins to directories to avoid file collisions with other packages. Note that this function is only defined and exported in EAPIs >= 8.

vim-plugin_src_install [<dir>...]

Overrides the default src_install phase. In order, this function:

  • installs help and documentation files.

  • installs all files recognized by default Vim installation and directories passed to this function as arguments in "${ED}"/usr/share/vim/vimfiles.

Example use:

src_install() {
    vim-plugin_src_install syntax_checkers
}
vim-plugin_pkg_postinst

Overrides the pkg_postinst phase for this eclass. The following functions are called:

  • update_vim_helptags

  • update_vim_afterscripts

  • display_vim_plugin_help

vim-plugin_pkg_postrm

Overrides the pkg_postrm phase for this eclass. This function calls the update_vim_helptags and update_vim_afterscripts functions and eventually removes a bunch of empty directories.

update_vim_afterscripts

Creates scripts in /usr/share/vim/vimfiles/after/* comprised of the snippets in /usr/share/vim/vimfiles/after//.d

display_vim_plugin_help

Displays a message with the plugin's help file if one is available. Uses the VIM_PLUGIN_HELPFILES env var. If multiple help files are available, they should be separated by spaces. If no help files are available, but the env var VIM_PLUGIN_HELPTEXT is set, that is displayed instead. Finally, if we have nothing else, this functions displays a link to VIM_PLUGIN_HELPURI. An extra message regarding enabling filetype plugins is displayed if VIM_PLUGIN_MESSAGES includes the word "filetype".

Variables

VIM_PLUGIN_VIM_VERSION ?= 7.3

Minimum Vim version the plugin supports.

Maintainers

vim@gentoo.org

Reporting Bugs

Please report bugs via https://bugs.gentoo.org/