本文整理汇总了TypeScript中vscode.window.showTextDocument方法的典型用法代码示例。如果您正苦于以下问题:TypeScript window.showTextDocument方法的具体用法?TypeScript window.showTextDocument怎么用?TypeScript window.showTextDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vscode.window
的用法示例。
在下文中一共展示了window.showTextDocument方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
.then((doc: vscode.TextDocument) => {
textDoc = doc;
return vscode.window.showTextDocument(doc)
})
示例2:
}).then((doc) => {
return window.showTextDocument(doc, ViewColumn.One);
}).then(() => {
示例3:
Workspace.openTextDocument(path).then((document) => {
Window.showTextDocument(document);
});
示例4:
vscode.workspace.openTextDocument(fileEncodingUsed).then(document => {
textDocument = document;
return vscode.window.showTextDocument(textDocument);
}).then(editor => {
示例5: openFile
async function openFile(fileName: string) {
const document = await vscode.workspace.openTextDocument(fileName);
const editor = await vscode.window.showTextDocument(document);
assert(vscode.window.activeTextEditor, 'No active editor');
return editor;
}
示例6:
return vscode.workspace.openTextDocument(filePath).then(document => {
return vscode.window.showTextDocument(document, vscode.ViewColumn.Three);
});
示例7:
return vscode.workspace.openTextDocument(fileToFormatWithoutConfig).then(document => {
textDocument = document;
originalContent = textDocument.getText();
return vscode.window.showTextDocument(textDocument);
}).then(editor => {
示例8:
openDocument.then((document:TextDocument) =>
{
window.showTextDocument(document);
});
示例9: openDocument
async function openDocument() {
const uri = Uri.file(editorFile1);
const textDocument = await workspace.openTextDocument(uri);
return window.showTextDocument(textDocument);
}