The document associated with this text editor. The document will be the same for the entire lifetime of this text editor.
Text editor options.
The primary selection on this text editor. Shorthand for TextEditor.selections[0]
.
The selections in this text editor. The primary selection is always at index 0.
The column in which this editor shows. Will be undefined
in case this
isn't one of the main editors, e.g. an embedded editor, or when the editor
column is larger than three.
The current visible ranges in the editor (vertically). This accounts only for vertical scrolling, and not for horizontal scrolling.
Perform an edit on the document associated with this text editor.
The given callback-function is invoked with an edit-builder which must be used to make edits. Note that the edit-builder is only valid while the callback executes.
A function which can create edits using an edit-builder.
The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.
A promise that resolves with a value indicating if the edits could be applied.
Hides this text editor.
Insert a snippet and put the editor into snippet mode. "Snippet mode" means the editor adds placeholders and additional cursors so that the user can complete or accept the snippet.
The snippet to insert in this edit.
Position or range at which to insert the snippet, defaults to the current editor selection or selections.
The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.
A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal that the snippet is completely filled-in or accepted.
Scroll as indicated by revealType
in order to reveal the given range.
A range.
The scrolling strategy for revealing range
.
Adds a set of decorations to the text editor. If a set of decorations already exists with the given decoration type, they will be replaced.
A decoration type.
Shows this text editor. A column can be provided to control where the editor is being shown. Might change the active editor.
A view column in which this editor should be shown.
Represents a text editor. To close editor use 'workbench.action.closeActiveEditor' command.