本文整理匯總了TypeScript中vscode.window.onDidChangeTextEditorViewColumn方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript window.onDidChangeTextEditorViewColumn方法的具體用法?TypeScript window.onDidChangeTextEditorViewColumn怎麽用?TypeScript window.onDidChangeTextEditorViewColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vscode.window
的用法示例。
在下文中一共展示了window.onDidChangeTextEditorViewColumn方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Promise
await new Promise(resolve => {
let registration2 = window.onDidChangeTextEditorViewColumn(event => {
actualEvent = event;
registration2.dispose();
resolve();
});
// close editor 1, wait a little for the event to bubble
one.hide();
});
示例2: activate
export function activate(context: ExtensionContext) {
const status = window.createStatusBarItem(StatusBarAlignment.Right, 100);
status.command = 'extension.selectedLines';
context.subscriptions.push(status);
context.subscriptions.push(window.onDidChangeActiveTextEditor(e => updateStatus(status)));
context.subscriptions.push(window.onDidChangeTextEditorSelection(e => updateStatus(status)));
context.subscriptions.push(window.onDidChangeTextEditorViewColumn(e => updateStatus(status)));
context.subscriptions.push(workspace.onDidOpenTextDocument(e => updateStatus(status)));
context.subscriptions.push(workspace.onDidCloseTextDocument(e => updateStatus(status)));
context.subscriptions.push(commands.registerCommand('extension.selectedLines', () => {
window.showInformationMessage(getSelectedLines());
}));
updateStatus(status);
}
示例3: activate
export function activate(context: ExtensionContext) {
// Create a status bar item
const status = window.createStatusBarItem(StatusBarAlignment.Left, 1000000);
context.subscriptions.push(status);
// Update status bar item based on events for multi root folder changes
context.subscriptions.push(workspace.onDidChangeWorkspaceFolders(e => updateStatus(status)));
// Update status bar item based on events for configuration
context.subscriptions.push(workspace.onDidChangeConfiguration(e => this.updateStatus(status)));
// Update status bar item based on events around the active editor
context.subscriptions.push(window.onDidChangeActiveTextEditor(e => updateStatus(status)));
context.subscriptions.push(window.onDidChangeTextEditorViewColumn(e => updateStatus(status)));
context.subscriptions.push(workspace.onDidOpenTextDocument(e => updateStatus(status)));
context.subscriptions.push(workspace.onDidCloseTextDocument(e => updateStatus(status)));
updateStatus(status);
}