hello README"keybindings": [ { "key": "cmd+shift+r", "command": "hello.helloWorld" } ] let editor = vscode.window.activeTextEditor; if (!editor) { return; } let document = editor.document; let selection = editor.selection; let text = document.getText(selection); console.log(111, text); // let result = text.split("").reverse().join(""); let result = text.toLocaleUpperCase(); editor.edit((editBuilder) => { editBuilder.replace(selection, result); }); |