Package-level declarations

Types

Link copied to clipboard
data class HighlightSelectionMatchConfig(val minSelectionLength: Int = 1, val maxMatches: Int = 100, val wholeWords: Boolean = false)

Configuration for selection match highlighting.

Link copied to clipboard
class RegExpCursor(text: Text, query: String, options: Set<RegexOption> = emptySet(), from: DocPos = DocPos.ZERO, to: DocPos = text.endPos) : Iterator<SearchMatch>

A cursor that iterates over regex matches in a Text document.

Link copied to clipboard
class SearchCursor(text: Text, query: String, from: DocPos = DocPos.ZERO, to: DocPos = text.endPos, normalize: (String) -> String = { it }) : Iterator<SearchMatch>

A cursor that iterates over string matches in a Text document.

Link copied to clipboard
data class SearchMatch(val from: DocPos, val to: DocPos)

A match found by a search cursor.

Link copied to clipboard
data class SearchQuery(val search: String = "", val caseSensitive: Boolean = false, val literal: Boolean = false, val regexp: Boolean = false, val replace: String = "", val wholeWord: Boolean = false, val test: (from: DocPos, to: DocPos, state: EditorState) -> Boolean? = null)

Represents a search query with options for how to match.

Properties

Link copied to clipboard

Close the search panel.

Link copied to clipboard

Move the selection to the next match.

Link copied to clipboard

Move the selection to the previous match.

Link copied to clipboard

Command that opens the go-to-line dialog.

Link copied to clipboard

Open the search panel. Lazily installs the search extension if needed.

Link copied to clipboard

Replace all matches in the document.

Link copied to clipboard

Replace the current match (if any) and move to the next one.

Link copied to clipboard

Default search keymap bindings.

Link copied to clipboard

State field tracking whether the search panel is open.

Link copied to clipboard

State field tracking the current search query.

Link copied to clipboard

Select all matches as a multi-selection.

Link copied to clipboard

Select all instances of the currently selected text.

Link copied to clipboard

Effect to set the current search query.

Link copied to clipboard

Effect to toggle the search panel open/closed.

Functions

Link copied to clipboard

Get the current search query from an editor state.

Link copied to clipboard
fun highlightSelectionMatches(config: HighlightSelectionMatchConfig = HighlightSelectionMatchConfig()): Extension

Extension that highlights all occurrences of the currently selected text.

Link copied to clipboard
fun search(panelModifier: BoxScope.() -> Modifier? = null): Extension

Create an extension that provides search functionality.

Link copied to clipboard

Whether the search panel is currently open.