VimInputState
Unofficial
The half-typed command the key handler is assembling — the count, operator, motion and register seen so far. It is cleared once the command runs or the input is abandoned.
Import:
import type { VimInputState } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface VimInputStateProperties
| Property | Type | Description | |
|---|---|---|---|
| changeQueue | null | VimChangeQueue | The text an insert-mode binding replaced, or null when nothing is pending. | |
| changeQueueList? | (null | VimChangeQueue)[] | The change queues of the other selections, when there is more than one. | |
| keyBuffer | string[] | The keys typed towards the command being matched. | |
| motion | null | string | The name of the motion typed so far, or null when none has been. | |
| motionArgs | null | VimMotionArgs | The arguments of the motion typed so far. | |
| motionRepeat | string[] | The digits of the count typed after the operator. | |
| operator | null | string | The name of the operator typed so far, or null when none has been. | |
| operatorArgs | null | VimOperatorArgs | The arguments of the operator typed so far. | |
| operatorShortcut? | string | The keys of a multi-key operator, which repeats by retyping only its last character. | |
| prefixRepeat | string[] | The digits of the count typed before the operator. | |
| registerName | null | string | The register named for this command, or null for the unnamed register. | |
| selectedCharacter? | string | The character typed for a command that takes one, such as f or r. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getRepeat() | number | Resolve the typed digits into the count the command runs with. | |
| pushRepeatDigit(n) | void | Append a digit to the count being typed, before or after the operator depending on how far the command has got. |
Links to this page: