showTextDocumentAsync

fun showTextDocumentAsync(document: TextDocument, column: ViewColumn = definedExternally, preserveFocus: Boolean = definedExternally): PromiseLike<TextEditor>(source)

Show the given document in a text editor. A column can be provided to control where the editor is being shown. Might change the active editor.

Parameters

document

A text document to be shown.

column

A view column in which the editor} should be shown. The default is the {@link ViewColumn.Active active. Columns that do not exist will be created as needed up to the maximum of ViewColumn.Nine. Use ViewColumn.Beside to open the editor to the side of the currently active one.

preserveFocus

When true the editor will not take focus.


Show the given document in a text editor. Options can be provided to control options of the editor is being shown. Might change the active editor.

Parameters


A short-hand for openTextDocument(uri).then(document => showTextDocument(document, options)).

Parameters

See also

workspace.openTextDocument