Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62559 - Better handling for vim plugins with help files
Summary: Better handling for vim plugins with help files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 15:00 UTC by Ciaran McCreesh
Modified: 2004-09-07 18:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
vim-plugin-eclass-helpfiles.patch (vim-plugin-eclass-helpfiles.patch,1.00 KB, patch)
2004-09-01 15:38 UTC, Ciaran McCreesh
Details | Diff
updated vim-plugin-eclass-helpfiles.patch (vim-plugin-eclass-helpfiles.patch,1.45 KB, patch)
2004-09-01 17:48 UTC, Ciaran McCreesh
Details | Diff
updated vim-plugin-eclass-helpfiles.patch (vim-plugin-eclass-helpfiles.patch,1.25 KB, patch)
2004-09-02 07:23 UTC, Ciaran McCreesh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.