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-public-latest';Signature:
export interface VimSearchStateProperties
| Property | Type | Description | |
|---|---|---|---|
| highlightTimeout? | null | number | The pending timer that installs the highlight overlay, or null when none is pending. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getOverlay() | undefined | VimSearchOverlay | Get the overlay highlighting the current query's matches. | |
| getQuery() | null | RegExp | Get the current search query. | |
| getScrollbarAnnotate() | unknown | Get the scrollbar annotation showing where the matches are. | |
| isReversed() | boolean | Check whether the search runs towards the start of the document. | |
| setOverlay(overlay) | void | Set the overlay highlighting the current query's matches. | |
| setQuery(query) | void | Set the current search query. | |
| setReversed(reversed) | void | Set whether the search runs towards the start of the document. | |
| setScrollbarAnnotate(annotate) | void | Set the scrollbar annotation showing where the matches are. |
Links to this page: