Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>FreeMarker-XML FormatterNew to Visual Studio Code? Get it now.
FreeMarker-XML Formatter

FreeMarker-XML Formatter

Franco Zambon

|
119 installs
| (0) | Free
Formatter for XML files containing FreeMarker code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FreeMarker XML Formatter README

Author: Franco Zambon

Last modified: February 25, 2025

The FreeMarker XML Formatter is a Visual Studio Code extension designed to format XML files that contain FreeMarker code. It ensures proper indentation and structure, even when complex FreeMarker directives are embedded within the XML.

Features

This extension provides:

  1. Correct XML Formatting.
  2. Indentation for FreeMarker functions that respects FreeMarker-specific logic and nested conditions.
  3. Handles Mixed Content (XML + FreeMarker) without breaking the structure.

To use the formatter on Windows press Ctrl + Shift + P (Cmd + Shift + P on Mac) and digit 'Format FreeMarker-XML File'. Then press Enter. Otherwise you can use the shortcut Ctrl + Alt + F on Windows or Ctrl + Option + F on Mac. You can select the area that you want to format. If you don't select any specific area the formatting rules will be applied on the whole document.

NOTE: FreeMarker formatting is enabled ONLY INSIDE <#function> blocks. Outside of those blocks FreeMarker code follows the XML indentation.

Requirements

Visual Studio Code (version 1.60.0 or later).

No external dependencies required.

Known Issues

The handling of tags inserted within the ${} syntax needs improvement. Additionally, the handling of XML tags present within Freemarker's <#macro> tags can be improved.

Release Notes

1.0.1

February 22, 2025 - Initial release

1.1.0

February 25, 2025 - Bug fixing and new feature

1.1.1

February 25, 2025 - Bug fixing

1.1.2

February 25, 2025 - Bug fixing


Enjoy!

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