Implements immediate searching while the user is typing. When incremental search is activated, keystrokes into the editor will be used for composing a search term. Immediately after every keystroke the search is updated:

  • so-far-matching characters are highlighted
  • the cursor is moved to the next match

Hierarchy (view full)

Constructors

Properties

$currentPos: any
$editor: any
$mousedownHandler: any
$options: {
    skipCurrent: boolean;
    wrap: boolean;
}

Type declaration

  • skipCurrent: boolean
  • wrap: boolean
$originalEditorOnPaste: any
$prevNeedle: any
$startPos: any

Methods

  • Parameters

    • options: Partial<SearchOptions>
    • Optional $disableFakeMultiline: boolean

    Returns any

  • Parameters

    • session: EditSession
    • options: any

    Returns false | {
        forEach: ((callback) => void);
    }

  • Searches for options.needle. If found, this method returns the [[Range Range]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

    Parameters

    • session: EditSession

      The session to search with

    Returns false | Range

  • Searches for all occurrances options.needle. If found, this method returns an array of [[Range Ranges]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

    Parameters

    • session: EditSession

      The session to search with

    Returns Range[]

  • [Returns an object containing all the search options.]{: #Search.getOptions}

    Returns Partial<SearchOptions>

  • Parameters

    • moveToNext: boolean
    • needleUpdateFunc: Function

    Returns false | Range

  • Searches for options.needle in input, and, if found, replaces it with replacement.

    Parameters

    • input: string

      The text to search in

    • replacement: any

      The replacing text

      • (String): If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement.
        If options.needle was not found, this function returns null.

    Returns string

  • Sets the search options via the options parameter.

    Parameters

    • options: Partial<SearchOptions>

      An object containing all the new search properties

    Returns Search

    Chainable

  • Sets the search options via the options parameter.

    Parameters

    • options: Partial<SearchOptions>

      object containing all the search propertie

    Returns void

    Related

    Search.set

Generated using TypeDoc