VimActionArgs
Unofficial
Arguments describing how a Vim action behaves.
Every field is optional because a key mapping only supplies the ones its action cares about. The resolved form handed to an action handler always carries a repeat, modelled by VimResolvedActionArgs.
Import:
import type { VimActionArgs } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface VimActionArgsProperties
| Property | Type | Description | |
|---|---|---|---|
| after? | boolean | Whether the action takes effect after the cursor rather than before it. | |
| backtrack? | boolean | Whether the cursor steps back onto the last inserted character once the action completes. | |
| blockwise? | boolean | Whether the action treats the register contents as a visual block. | |
| direction? | VimResizeDirection | Which way a resize action changes the size of its target. | |
| forward? | boolean | Whether the action moves towards the end of the document. | |
| head? | EditorPosition | The position the action starts from, when it does not start from the cursor. | |
| increase? | boolean | Whether a numeric action increments. false decrements. | |
| indentRight? | boolean | Whether an indent action adds indentation. false removes it. | |
| insertAt? | VimInsertAt | Where the cursor is placed when the action enters insert mode. | |
| isEdit? | boolean | Whether the action counts as an edit, making it repeatable with .. | |
| keepSpaces? | boolean | Whether a join action preserves the whitespace between the joined lines. | |
| linewise? | boolean | Whether the action operates on whole lines rather than a character range. | |
| matchIndent? | boolean | Whether pasted text is re-indented to match the surrounding lines. | |
| position? | VimScrollPosition | Where the cursor line is placed in the viewport, for scroll-positioning actions. | |
| registerName? | string | The register the action reads from or writes to. Defaults to the unnamed register. | |
| repeat? | number | How many times the action is applied. | |
| repeatIsExplicit? | boolean | Whether the repeat count was typed by the user rather than defaulted. | |
| replace? | boolean | Whether the action replaces the existing text rather than inserting alongside it. | |
| selectedCharacter? | string | The character the action was given, for actions such as r that take one. |
Links to this page: