Skip to content

VimRegisterController

Unofficial

Owns every Vim register and routes yanks, deletes and pastes to the right one.

Import:

import type { VimRegisterController } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface VimRegisterController

Properties

PropertyTypeDescription
registersRecord<string, VimRegister>Every register, keyed by its one-character name.
unnamedRegisterVimRegisterThe register used when no register was named explicitly.

Methods

MethodReturnsDescription
getRegister(name?)VimRegisterGet the register with the given name, creating it if it does not exist yet. An invalid name yields the unnamed register.
isValidRegister(name)name is stringCheck whether the given name identifies a register.
pushText(registerName, operator, text, linewise?, blockwise?)voidStore text into a register on behalf of an operator, also updating the unnamed and numbered registers the way Vim does.
shiftNumericRegisters_()voidShift the numbered registers up by one, so register 1 becomes 2 and so on.

Links to this page: