Skip to content

VimSearchState

Unofficial

The per-editor search state: the active query, its highlight overlay, and the direction it runs in.

The query and its direction are stored globally, so every editor shares them; only the overlay and its highlight timer are per-editor.

Import:

import type { VimSearchState } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface VimSearchState

Properties

PropertyTypeDescription
highlightTimeout?null | numberThe pending timer that installs the highlight overlay, or null when none is pending.

Methods

MethodReturnsDescription
getOverlay()undefined | VimSearchOverlayGet the overlay highlighting the current query's matches.
getQuery()null | RegExpGet the current search query.
getScrollbarAnnotate()unknownGet the scrollbar annotation showing where the matches are.
isReversed()booleanCheck whether the search runs towards the start of the document.
setOverlay(overlay)voidSet the overlay highlighting the current query's matches.
setQuery(query)voidSet the current search query.
setReversed(reversed)voidSet whether the search runs towards the start of the document.
setScrollbarAnnotate(annotate)voidSet the scrollbar annotation showing where the matches are.

Links to this page: