1 . 通过hx.window.getActiveTextEditor()

    2 . 通过编辑器,hx.commands.registerTextEditorCommand(‘id’,(editor)=>{});

    1. let document = editor.document;
    2. let word = document.getText(selection);
    3. editBuilder.replace(selection, reversed);