Use Case
- Find and replace: quickly locate words or phrases and replace them.
- Content navigation: jump to the next or previous match without scrolling manually.
- Highlighting: visually emphasize search results for the user.
- Custom workflows: integrate search into toolbars, command palettes, or keyboard shortcuts.
Commands
goToFirstMatch
Navigate to the first search match
Scrolls editor to the first match from previous search
search
Search for string matches in editor content
Returns array of SearchMatch objects with positions and IDs
Search string or pattern
goToSearchResult
Navigate to a specific search match
Scrolls to match and selects it
Match object to navigate to