Skip to content

VimLastSelection

Unofficial

The visual selection as it was when visual mode was last left, which gv restores.

The bookmarks track the document as it changes, so the selection can still be restored after edits; the positions are where the selection was when it was saved.

Import:

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

Signature:

export interface VimLastSelection

Properties

PropertyTypeDescription
anchorEditorPositionThe position of the fixed end of the selection.
anchorMarkBookmarkThe bookmark tracking the fixed end of the selection.
headEditorPositionThe position of the moving end of the selection.
headMarkBookmarkThe bookmark tracking the moving end of the selection.
visualBlockbooleanWhether the selection was made in visual block mode.
visualLinebooleanWhether the selection was made in visual line mode.
visualModebooleanWhether visual mode was active when the selection was saved.

Links to this page: