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
let activeEditor = hx.window.getActiveTextEditor();
activeEditor.then(function(editor){
console.log(editor.document.fileName);
});