Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MyBatis SQL FormatterNew to Visual Studio Code? Get it now.
MyBatis SQL Formatter

MyBatis SQL Formatter

Mer Bleue Aviation

|
17 installs
| (0) | Free
format MyBatis tag mixed with SQL
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MyBatis SQL Formatter

Github Version Github Build Status GitHub License GitHub Starts VS marketplace Version downloads installs rating

English | 简体中文

A VS Code extension to format MyBatis XML files and SQL fragments containing MyBatis dynamic tags.

Logo

Features

  • Format MyBatis XML: Correctly formats <mapper>, <select>, <insert>, <update>, <delete> and other MyBatis tags with proper indentation.
  • Format SQL Fragments: Supports formatting raw SQL fragments mixed with MyBatis dynamic tags (like <if>, <choose>, <where>, <foreach>) directly, without needing a root XML element.
  • SQL Indentation: Formats the SQL content inside MyBatis tags using standard SQL formatting rules while preserving MyBatis tag structure.

Usage

  1. Open a MyBatis XML file (.xml) or a file containing MyBatis SQL (.sql).
  2. Run the command Format Document (Shift+Alt+F on Windows) or right-click and select Format Document.
  3. Alternatively, use the dedicated command Format MyBatis SQL or the shortcut:
    • Windows: Ctrl+Win+F
    • Mac: Ctrl+Cmd+F
    • Linux: Ctrl+Meta+F

Requirements

None.

Extension Settings

No configuration needed yet.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft