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 VimLastSelectionProperties
| Property | Type | Description | |
|---|---|---|---|
| anchor | EditorPosition | The position of the fixed end of the selection. | |
| anchorMark | Bookmark | The bookmark tracking the fixed end of the selection. | |
| head | EditorPosition | The position of the moving end of the selection. | |
| headMark | Bookmark | The bookmark tracking the moving end of the selection. | |
| visualBlock | boolean | Whether the selection was made in visual block mode. | |
| visualLine | boolean | Whether the selection was made in visual line mode. | |
| visualMode | boolean | Whether visual mode was active when the selection was saved. |
Links to this page: