getActiveTextEditor
獲取當前激活的編輯器,如果沒有打開的編輯器返回undefined
參數說明
無
返回值
| 返回類型 | 描述 |
|---|---|
| Promise<TextEditor> | 返回當前激活的編輯器 |
示例
let activeEditor = hx.window.getActiveTextEditor();activeEditor.then(function(editor){console.log(editor.document.fileName);});
獲取當前激活的編輯器,如果沒有打開的編輯器返回undefined
無
| 返回類型 | 描述 |
|---|---|
| Promise<TextEditor> | 返回當前激活的編輯器 |
let activeEditor = hx.window.getActiveTextEditor();activeEditor.then(function(editor){console.log(editor.document.fileName);});
若有收获,就点个赞吧
0 人点赞
让时间为你证明