文件操作
const document = await vscode.workspace.openTextDocument(uri);
document.getText();
vscode.workspace.fs.writeFile(uri: Uri, content: Uint8Array): Thenable<void>;
vscode.Uri.joinPath(base: Uri, ...pathSegments: string[]): Uri;
Buffer.from(JSON.stringify({}, null, 2));
vscode.window.showTextDocument(uri: Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>;;
vscode.env.clipboard.readText(): Thenable<string>;
vscode.env.clipboard.writeText(value: string): Thenable<void>;
编辑器操作
const { document, selection } = vscode.window.activeTextEditor;
document.uri;
document.getText();
document.getText(selection);
提示交互
vscode.window.setStatusBarMessage(text: string, hideAfterTimeout: number): Disposable;
vscode.window.showInformationMessage(message: string): Thenable<string | undefined>;
vscode.window.showWarningMessage(message: string): Thenable<string | undefined>;
vscode.window.showErrorMessage(message: string): Thenable<string | undefined>;
其它
vscode.commands.executeCommand('vscode.openWith', resource, editor);
参考资料