Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 62559

Summary: Better handling for vim plugins with help files
Product: Gentoo Linux Reporter: Ciaran McCreesh <ciaran.mccreesh>
Component: New packagesAssignee: Vim Maintainers <vim>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: vim-plugin-eclass-helpfiles.patch
updated vim-plugin-eclass-helpfiles.patch
updated vim-plugin-eclass-helpfiles.patch

Description Ciaran McCreesh 2004-09-01 15:00:25 UTC
Would be nice if vim plugins which provided help files said so in an einfo. Best way to handle this is probably to update pkg_postinst in the vim-plugin eclass to check for a VIM_PLUGIN_HELPFILE and display a "This plugin provides a help file. Please use :help $VIM_PLUGIN_HELPFILE for more information." or somesuch...
Comment 1 Ciaran McCreesh 2004-09-01 15:38:45 UTC
Created attachment 38712 [details, diff]
vim-plugin-eclass-helpfiles.patch

Lets vim plugins specify VIM_PLUGIN_HELPFILES. For example:

VIM_PLUGIN_HELPFILES="align-manual align-maps"

gives an einfo like:

 *
 * This plugin provides documentation via vim's help system. To
 * view it, use:
 *     :help align-manual
 *     :help align-maps
 *
Comment 2 Ciaran McCreesh 2004-09-01 17:48:15 UTC
Created attachment 38717 [details, diff]
updated vim-plugin-eclass-helpfiles.patch

For plugins which don't provide a help file, we could use VIM_PLUGIN_HELPTEXT
to display a short usage message. So:

VIM_PLUGIN_HELPTEXT=( \
	"To use this plugin, press the tab key whilst in insert mode. Words" \
	"will be autocompleted as per ctrl+n. Completion mode can be changed" \

	"using ctrl+x. To insert an actual tab character, either use ctrl+v" \
	"tab or enter a space followed by a tab." \
	)

when no VIM_PLUGIN_HELPFILES is available will give:

 *  
 * To use this plugin, press the tab key whilst in insert mode. Words
 * will be autocompleted as per ctrl+n. Completion mode can be changed
 * using ctrl+x. To insert an actual tab character, either use ctrl+v
 * tab or enter a space followed by a tab.
 *
Comment 3 Ciaran McCreesh 2004-09-02 07:23:18 UTC
Created attachment 38758 [details, diff]
updated vim-plugin-eclass-helpfiles.patch

As per Aron's suggestions, switch to using [[ ]] over [ ] and kill the array
syntax. Multiline strings can be used instead now.
Comment 4 Ciaran McCreesh 2004-09-07 18:13:09 UTC
Eclass updated. Variables for most things in app-vim set.