2017-03-09 43 views

回答

1

你可以簡單地使用vscode.workspace.openTextDocument方法來創建TextDocument實例。

一個例子是:

vscode.workspace.openTextDocument({ 
     language: 'text' 
    }) 
    .then(doc => { 
     // Do something useful with the document. 
    }); 

如果你想看到它在上下文中使用,隨意看this part of code

+0

我擔心這實際上會在編輯器中打開該文件,但事實並非如此。它的工作方式完全如我所願。謝謝!太棒了。 :) –

相關問題