Optional$blockOptional$codeOptional$multiselectOptional$optionsOptional$updateOptional$updateAdds the selection and cursor.
Aligns the cursors or selected text.
OptionalcmdOptionalcodeOptionalcompleter}
OptionalelasticOptionalenvRemoves all the selections except the last added one.
Finds and selects all the occurrences of needle.
Optionalneedle: stringThe text to find
Optionaloptions: Partial<SearchOptions>The search options
Optionaladditive: booleankeeps
The cumulative count of all found matches
Executes a command for each selection range.
The command to execute
Optionalargs: stringAny arguments for the command
Optionaloptions: ObjectOptionalinOptionalisOptionalmultiRemoves the selection marker.
OptionalsearchOptionalselectedFinds the next occurrence of text in an active selection and adds it to the selections.
The direction of lines to select: -1 for up, 1 for down
Optionalskip: booleanIf true, removes the active selection range
OptionalstopAtFirst: booleanAdds a cursor above or below the active cursor.
The direction of lines to select: -1 for up, 1 for down
Optionalskip: booleanIf true, removes the active selection range
OptionalsetOptionalshowOptionalshowTransposes the selected ranges.
The direction to rotate selections
Updates the cursor and marker layers.
OptionalwidgetOptionalcapturing: booleanOptionalcapturing: booleanAttempts to find needle within the document. For more information on options, see [[Search Search]].
The text to search for (optional)
Optionaloptions: Partial<SearchOptions>An object defining various search properties
Optionalanimate: booleanIf true animate scrolling
Performs another search for needle in the document. For more information on options, see [[Search Search]].
Optionaloptions: Partial<SearchOptions>search options
Optionalanimate: booleanIf true animate scrolling
Performs a search for needle backwards. For more information on options, see [[Search Search]].
Optionaloptions: Partial<SearchOptions>search options
Optionalanimate: booleanIf true animate scrolling
{:Search.getOptions} For more information on options, see [[Search Search]].
OptionaloptionNames: Partial<EditorOptions> | (keyof EditorOptions)[]Returns the current session being used.
Moves the cursor to the specified line number, and also into the indicated column.
The line number to go to
Optionalcolumn: numberA column number to go to
Optionalanimate: booleanIf true animates scolling
Optionalcapturing: booleanOptionalcapturing: booleanReplaces the first occurrence of options.needle with the value in replacement.
Optionalreplacement: stringThe text to replace with
Optionaloptions: Partial<SearchOptions>The [[Search Search]] options to use
Replaces all occurrences of options.needle with the value in replacement.
Optionalreplacement: stringThe text to replace with
Optionaloptions: Partial<SearchOptions>The [[Search Search]] options to use
Scrolls to a line. If center is true, it puts the line in middle of screen (or attempts to).
The line to scroll to
If true
If true animates scrolling
Optionalcallback: () => voidFunction to be called when the animation has finished
Set the "ghost" text in provided position. "Ghost" text is a kind of preview text inside the editor which can be used to preview some code inline in the editor such as, for example, code completions.
Text to be inserted as "ghost" text
Optionalposition: PointPosition to insert text to
Sets a new key handler, such as "vim" or "windows".
The new key handler
Optionalcb: () => voidPass in true to enable overwrites in your session, or false to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite changes, this function also emits the changeOverwrite event.
Defines whether or not to set overwrites
Sets a new editsession to use. This method also emits the 'changeSession' event.
Optionalsession: EditSessionThe new session to use
Sets the current document to val.
The new value to set for the document
OptionalcursorPos: numberWhere to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end
The current document value
This object is used in some places where needed to show popups - like prompt; autocomplete etc.