Class chorus.usercmd.Spec
-
class chorus.usercmd.Spec:
vim.api.keyset.user_command User command spec
Specifies how to create one or more user commands
-
buffer: (
boolean|integer)? Create command only for given buffer;
0ortruemean the current buffer. Default:false
-
addr:
string? Address range handling
-
bang:
boolean? Command accepts
!. Default:false
-
bar:
boolean? Command can be followed by a
|and another command. Default:false
-
complete: (
string|function)? Completion rule. Default: none
-
count: (
integer|boolean)? Count accepted.
false: Count not accepted (default)n: A count (defaultn) is specified in the line number position or first argumenttrue: Acts like0
-
desc:
string? A description of the command. Default: none
-
force:
boolean? Override previous definition. Default:
true
-
keepscript:
boolean? Use location of command invocation for verbose messages. Default:
false
-
nargs: (0 | 1 | "*" | "?" | "+")?
Argument count.
0: No arguments allowed (default)1: One argument required'*': Any number of whitespace-separated arguments are allowed'?': 0 or 1 arguments allowed'+': One or more arguments required
-
preview: (
function)? Preview callback
-
range: (
boolean| "%" |integer)? Range allowed
false: Range not accepted (default)true: Range accepted, default is current line'%': Range accepted, default is whole filen: A count (defaultn) is specified in the line number position
-
register:
boolean? The first argument to the command can be an optional register name. Default:
false
-
[
string]: (string|chorus.usercmd.Spec) Nested specification
"<name>" = "<cmd>": Command name and ex command to run"<name>" = function(args) .. endCommand name and function to run"<name>" = { .... }Nested specification (should not provide name) which inherits options from parent table
-
[
integer]: (string|chorus.usercmd.Func|chorus.usercmd.Spec) Positional arguments
"<name>", "<cmd>": Command name and ex command to run"<name>", function(args) ... end: Command name and function to run{ ... }, ...: Nested user command specs which inherit options from the parent table
-
buffer: (