1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 21:02:27 +01:00

initial crack at :command -complete - YALNS

This commit is contained in:
Doug Kearns
2008-11-13 15:41:08 +00:00
parent 8b37c91b7b
commit 47fbbacf41
5 changed files with 80 additions and 11 deletions

View File

@@ -286,6 +286,40 @@ The valid values are:
*-nargs=+* One or more argument is allowd
--------------------------------------------------------------------------------
|E180| |E181| |:command-complete| +
Argument completion
Completion for arguments to user defined commands is not available by default.
Completion can be enabled by specifying one of the following arguments to the
-complete option when defining the command.
`----------------`--------------------------------------------------------------
*bookmark* bookmarks
*buffer* buffers
*command* Ex commands
*environment* environment variables
*event* autocommand events
*file* files
*help* help tags
*javascript* javascript
*mapping* user mappings
*shellcmd* shell commands
*url* URLs
*custom,{func}* custom completion, provided by {func}
--------------------------------------------------------------------------------
|E467| |E468| |:command-completion-custom| +
Custom completion
Custom completion can be provided by specifying the "custom,{func}" argument to
-complete. The {func} is called with one argument, the word being completed,
and should return an array [start, completions].
*start* is the index into the word being completed at which the returned values
should be applied and *completions* is a two dimensional array of the form:
\[[arg1, description1], [arg2, description2], ...]
// TODO: add examples
|E177| |E178| |:command-count| +
Count handling