mirror of
https://github.com/We-Dont-Byte/Mind_Reader.git
synced 2025-02-04 10:38:42 +00:00
Implement increasing font and editor scale
The following commands adjust the font scale in the editor only:
- mind-reader.increaseFontScale
- mind-reader.decreaseFontScale
- mind-reader.resetFontScale
The following commands adjust the overall editor scale:
- mind-reader.increaseEditorScale
- mind-reader.decreaseEditorScale
- mind-reader.resetEditorScale
This commit is contained in:
@@ -1,14 +1,50 @@
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
console.log('Congratulations, your extension "mind-reader" is now active!');
|
||||
vscode.window.showInformationMessage('Mind_Reader is loaded!')
|
||||
console.log('Congratulations, your extension "mind-reader" is now active!');
|
||||
vscode.window.showInformationMessage('Mind_Reader is loaded!');
|
||||
|
||||
let disposable = vscode.commands.registerCommand('mind-reader.helloWorld', () => {
|
||||
vscode.window.showInformationMessage('Hello World from Mind_Reader!');
|
||||
});
|
||||
// Increase Font Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.increaseFontScale', () => {
|
||||
vscode.commands.executeCommand('editor.action.fontZoomIn');
|
||||
})
|
||||
);
|
||||
|
||||
context.subscriptions.push(disposable);
|
||||
// Decrease Font Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.decreaseFontScale', () => {
|
||||
vscode.commands.executeCommand('editor.action.fontZoomOut');
|
||||
})
|
||||
);
|
||||
|
||||
// Reset Font Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.resetFontScale', () => {
|
||||
vscode.commands.executeCommand('editor.action.fontZoomReset');
|
||||
})
|
||||
);
|
||||
|
||||
// Increase Editor Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.increaseEditorScale', () => {
|
||||
vscode.commands.executeCommand('workbench.action.zoomIn');
|
||||
})
|
||||
);
|
||||
|
||||
// Decrease Editor Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.decreaseEditorScale', () => {
|
||||
vscode.commands.executeCommand('workbench.action.zoomOut');
|
||||
})
|
||||
);
|
||||
|
||||
// Reset Editor Scale
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('mind-reader.resetEditorScale', () => {
|
||||
vscode.commands.executeCommand('workbench.action.zoomReset');
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
export function deactivate() {}
|
||||
|
||||
Reference in New Issue
Block a user