getActiveTextEditor

The currently active editor or undefined. The active editor is the one that currently has focus or, when none has focus, the one that has changed input most recently.

Parameter

No parameters

Returns

Type Description
Promise<TextEditor> Return to the currently active editor

Example

  1. let activeEditor = hx.window.getActiveTextEditor();
  2. activeEditor.then(function(editor){
  3. console.log(editor.document.fileName);
  4. });