Support & CreditsIf this maintained fork helps you, please consider supporting the ongoing maintenance: This extension is a maintained community fork of the original openHAB Alignment Tool by Maximilian Beckenbauer. If you want to thank the original developer as well: This extension adds support for formatting and indenting openHAB files like Maintained Fork / Fixed BugThis 2026 maintained fork includes the upstream fixes and adds a fix for item channel binding configurations where curly braces inside quoted strings could break formatting. Example affected cases are channel parameters that contain JSON-like values or text with It also corrects space-based column padding when FeaturesThe tool is available as a standard Visual-Studio-Code formatter as it uses the original vsc formatter API. You can force to formatting with right-clicking the document and clicking Item-Formatting:Column-Style:
Column-Channel-Style:
Multiline-Style:
Sitemap-Formatting:
Special Comment TagsWith the new version (v2) of this extension there are introduced new Special Comment Tags you can use in your `.items file code, to change the way the extension is formatting your code. New Group Tag
With this tag you can start a new formatting group for an item section. The tracking of the longest item parts is resetted and will be set to the longest item part in the new group. The following image shows an example of a formatting group:
New Formatting Style
With this tag you can change the formatting of the following item definitions from the default formatting style selected in the VSC settings to a new style inserted in
LimitationsThe formatting is available for the following openhab file types:
Extension SettingsNew Line After ItemWith this option you can choose if you want to have a new line inserted after each item. If there is already a single empty line after an item this settings is ignored.
Preserve WhitespaceWhitespaces (tabs or spaces) in front of items get preserved and won't be deleted.
Multiline Indent AmountWith this option you can control the amount of indent when using the Multiline format.
Format StyleThe format style option gives you two styles between you can choose.
The Column style formats the files in a column-way. Each item will be on one line and the item parts are separated in columns. With the ChannelColumn style only the channel part of an item gets formatted into multiple lines. The Multiline format prints every part of an item in a new line and indents the different parts. Known IssuesSee Github Issues file for the details. Release NotesSee CHANGELOG.md file for the details. For More InformationEnjoy! |





