Overview The MyBatis XML and SQL Formatter extension for Visual Studio Code enhances the readability and maintenance of your MyBatis configuration files by formatting both XML and embedded SQL statements. It preserves MyBatis-specific dynamic SQL tags while ensuring your code is clean and well-indented. Features Automatic Formatting: Formats MyBatis XML files and the SQL inside them with a single command. MyBatis Tag Handling: Special handling for MyBatis dynamic SQL tags like , , , , , and . Customizable Indentation: Define your preferred indentation level for both XML and SQL. File-Wide Formatting: Apply formatting to the entire document or just the selected part. Cross-Platform Support: Works seamlessly on Windows, macOS, and Linux. Installation Open Visual Studio Code. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. Search for "MyBatis XML and SQL Formatter". Click Install to add the extension to your VSCode. Usage Once installed, the extension can be used to format your MyBatis XML and SQL files: Format the Entire Document Open a MyBatis XML file in VSCode. Right-click on the editor and select Format Document, or use the default keyboard shortcut: Windows/Linux: Shift+Alt+F macOS: Shift+Option+F Format a Selection Select the portion of the file you want to format. Right-click on the selected text and choose Format Selection, or use the default keyboard shortcut: Windows/Linux: Ctrl+K Ctrl+F macOS: `Cmd+K Cmd |