VimApi.mapCommand method
VimApi › mapCommand
Unofficial
Map a key sequence directly to a registered command, which is whatmap is built on.Signature:
mapCommand(keys: string, type: "action" | "ex" | "idle" | "keyToEx" | "keyToKey" | "motion" | "operator" | "operatorMotion" | "search", name: string, args?: VimKeyMappingArgs | undefined, extra?: Partial<VimKeyMappingBase> | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| keys | string | The key sequence to map. |
| type | "action" | "ex" | "idle" | "keyToEx" | "keyToKey" | "motion" | "operator" | "operatorMotion" | "search" | Which kind of command the keys run. |
| name | string | The name the command was registered under. |
| args? | VimKeyMappingArgs | undefined | The arguments passed through to the command when the key sequence invokes it. |
| extra? | Partial<VimKeyMappingBase> | undefined | Further fields to set on the mapping. context restricts it to one mode, and isEdit — which applies to actions only — decides whether the command is recorded for replay by the . single-repeat command. |
Returns: void