diff --git a/src/main.ts b/src/main.ts index c9ff199..1dc5237 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,6 +13,11 @@ export function activate(ctx: ExtensionContext) { ctx.subscriptions.push(commands.registerTextEditorCommand('xmltools.linearizeXml', linearizeXml)); ctx.subscriptions.push(commands.registerTextEditorCommand('xmltools.evaluateXPath', evaluateXPath)); + // alias for editor.action.format + ctx.subscriptions.push(commands.registerTextEditorCommand('xmlTools.formatXml', () => { + commands.executeCommand('editor.action.format'); + })); + // register formatting providers ctx.subscriptions.push(languages.registerDocumentFormattingEditProvider('xml', new XmlDocumentFormattingProvider())); ctx.subscriptions.push(languages.registerDocumentRangeFormattingEditProvider('xml', new XmlRangeFormattingProvider()));