Skip to content

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 VimActionArgs

Properties

PropertyTypeDescription
after?booleanWhether the action takes effect after the cursor rather than before it.
backtrack?booleanWhether the cursor steps back onto the last inserted character once the action completes.
blockwise?booleanWhether the action treats the register contents as a visual block.
direction?VimResizeDirectionWhich way a resize action changes the size of its target.
forward?booleanWhether the action moves towards the end of the document.
head?EditorPositionThe position the action starts from, when it does not start from the cursor.
increase?booleanWhether a numeric action increments. false decrements.
indentRight?booleanWhether an indent action adds indentation. false removes it.
insertAt?VimInsertAtWhere the cursor is placed when the action enters insert mode.
isEdit?booleanWhether the action counts as an edit, making it repeatable with ..
keepSpaces?booleanWhether a join action preserves the whitespace between the joined lines.
linewise?booleanWhether the action operates on whole lines rather than a character range.
matchIndent?booleanWhether pasted text is re-indented to match the surrounding lines.
position?VimScrollPositionWhere the cursor line is placed in the viewport, for scroll-positioning actions.
registerName?stringThe register the action reads from or writes to. Defaults to the unnamed register.
repeat?numberHow many times the action is applied.
repeatIsExplicit?booleanWhether the repeat count was typed by the user rather than defaulted.
replace?booleanWhether the action replaces the existing text rather than inserting alongside it.
selectedCharacter?stringThe character the action was given, for actions such as r that take one.

Links to this page: