MSys Delphi Code Formatter
Advantages
More customisation options
Understand modern Delphi
Respects your layout
Ctrl+D is back as an add-on
The MSys Delphi Code Formatter brings source code formatting back to RAD Studio 13 — lossless, configurable, and entirely according to your own rules.
RAD Studio 13 has removed the built-in formatter. This plug-in fills the gap — and goes far beyond what its predecessor ever did.
Who doesn’t remember this from earlier versions of Delphi? A quick press of Ctrl+D — and the source code would appear just as it should: neatly indented, consistently formatted, and easy to read. A shortcut deeply ingrained in the muscle memory of every Delphi developer, as second nature as F9 for compiling.
With RAD Studio 13, this gesture was suddenly a thing of the past: the built-in source code formatter is no longer included. Every project quickly feels the impact of this — inconsistent styling, haphazard spacing, and indentation that varies depending on the developer’s mood. And code reviews that focus on aesthetics rather than substance.
Ctrl+D works again — in exactly the same places as before: in the editor, in the Edit menu, and in the context menu. No need to get used to anything new, no new workflow. Just carry on working as if the formatter had never been gone.
Here’s what the plugin looks like in the IDE: Press Ctrl+D right here on this page — or click the button.
The standard profile in action: keywords, spaces, indentation, type formatting and comment spacing — the line structure is preserved.
Three real-world examples — each rule can be activated individually.
// before
BEGIN
X:=A+B;
FOO(a,b,C1); {init}
end;
// after (Standard profile)
begin
X := A + B;
FOO(a, b, C1); { init }
end;// "Like first occurrence": one identifier, one spelling - unit-wide // before MyVar := 1; myvar := 2; MYVAR := 3; // after MyVar := 1; MyVar := 2; MyVar := 3;
// "uses: one unit per line" = Break // before uses System.SysUtils, System.Classes, System.Generics.Collections; // after uses System.SysUtils, System.Classes, System.Generics.Collections;
A formatter works on your most valuable asset — the source code.
Only layout and spelling change. The semantics remain untouched in any case.
The lexer captures every character — string contents and comments are passed through verbatim.
Format(Format(x)) = Format(x). Already formatted code remains stable.
If the source code is faulty: nothing happens. The editor content remains exactly as it was.
Plug-in for Delphi RAD Studio 13
Whether it's a support request, a suggestion for improvement, or a new feature request—you can easily submit your request through our ticket system and track its status at any time.
Thank you very much! Your ticket has been created.
Sign up for our newsletter on our Delphi Code Formatter and stay up to date.
Settings are merged with clear priority — the closest one wins.
The formatting rules travel with the repository. Standard keys plus own delphi_*-namespace. Perfect for teams.
The personal settings under Tools > Options > MSys > Delphi Code Formatter
A deliberately conservative profile that delivers good results immediately — without overhauling the code.
— Standard refers to the built-in Maenken profile. —
Die Basis-Hygiene jeder Datei: Einzug, Zeilenenden, Leerzeichen am Zeilenende, Schlussumbruch — entspricht den klassischen EditorConfig-Grundwerten.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Einzugzeichen
|
Leerzeichen / Tabulator
|
Leerzeichen
|
Womit eingerückt wird
|
|
Einzugbreite
|
Ganzzahl
|
2
|
Spalten pro Einzugstufe
|
|
Trailing-Whitespace entfernen
|
An / Aus
|
An
|
Entfernt Leerzeichen am Zeilenende
|
|
Trailing-Whitespace entfernen
|
Spalten pro Einzugstufe
|
Spalten pro Einzugstufe
|
Spalten pro Einzugstufe
|
|
Schluss-Umbruch sicherstellen
|
An / Aus
|
An
|
Genau ein Zeilenumbruch am Dateiende
|
|
Zeilenende
|
System / CRLF / LF / CR
|
System
|
Normalisiert die Zeilenumbruch-Art
|
Wie tief stehen Blockinhalte, Case-Zweige und Fortsetzungszeilen? Das Standardprofil rückt Blöcke und den Deklarationsteil sauber ein — tiefere Varianten sind Opt-in.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Einzugzeichen
|
An / Aus
|
An
|
Inhalte von begin/end, try, case, repeat
|
|
Case-Inhalte / Case-Marken
|
An / Aus
|
An
|
Case-Zweige und -Labels einrücken
|
|
Nach Sektionen einrücken
|
An / Aus
|
Aus
|
interface/implementation zusätzlich einrücken
|
|
Fortsetzungs-Einzug
|
Ganzzahl
|
2
|
Einrückung umbrochener Zeilen
|
|
Kein Einzug ab Spalte
|
Ganzzahl
|
40
|
Deckelt die Einzugsspalte bei tiefer Verschachtelung
|
Delphi ist case-insensitiv — das Auge nicht. Getrennt wählbare Regeln für Schlüsselwörter, Direktiven, Zahlen, Typen und Bezeichner.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Reservierte Wörter
|
Unverändert / GROSS / klein / Erster groß
|
klein
|
BEGIN → begin
|
|
Compiler-Direktiven
|
Unverändert / GROSS / klein / Erster groß
|
GROSS
|
{$ifdef} → {$IFDEF} (Argumente unberührt)
|
|
Zahlen (Hex / Exponent)
|
Unverändert / GROSS / klein / Erster groß
|
GROSS
|
$1abc → $1ABC, 1e5 → 1E5
|
|
Eingebaute Typen
|
… / Pascal (kanonisch)
|
Pascal
|
integer → Integer, nativeint → NativeInt
|
|
Sonstige Bezeichner
|
… / Wie erstes Vorkommen
|
Unverändert
|
Vereinheitlicht unit-weit auf das erste Vorkommen
|
Mikro-Typografie: der Abstand um Kommas, Operatoren, Doppelpunkte und Kommentar-Klammern — mit definiertem Tie-Breaker bei Regelkonflikt.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Komma / Semikolon / Doppelpunkt
|
Keine / davor / danach / beides / unverändert
|
Nur danach
|
Foo(a,b) → Foo(a, b)
|
|
Zuweisung / binäre Operatoren
|
Keine / davor / danach / beides / unverändert
|
Beides
|
x:=1+2 → x := 1 + 2
|
|
Unäre Operatoren
|
Keine / davor / danach / beides / unverändert
|
Keine
|
- 1 → -1 (not bleibt getrennt)
|
|
Klammer-Kommentar { }
|
Keine / innen / außen / beides
|
Innen und außen
|
{x} → { x }
|
|
Innenabstand Klammern / Generics
|
An / Aus
|
Aus
|
TList → TList
|
Der wichtigste Schalter des Formatters: „Benutzer-Umbrüche beibehalten” (Standard: an) lässt den Zeilenaufbau unangetastet. Erst wenn er aus ist, greifen die Umbruch-Regeln — vom begin-Stil bis zur uses-Liste.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Benutzer-Umbrüche beibehalten
|
An / Aus
|
An
|
Master-Schalter für alle Umbruch-Regeln
|
|
Platzierung von begin
|
Wie eingegeben / K&R / Allman
|
Wie eingegeben
|
begin am Zeilenende oder auf eigener Zeile
|
|
uses: eine Unit pro Zeile
|
Wie eingegeben / Zusammenziehen / Umbrechen
|
Wie eingegeben
|
Umbruch nach jedem Komma der uses-Liste
|
|
end und else zusammenführen
|
An / Aus
|
An
|
end + else → end else
|
Parameter je Zeile, Vererbungslisten, Property-Accessoren — und der intelligente Modus „Wenn zu lang”: umgebrochen wird nur, was über den rechten Rand hinauslaufen würde.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Parameter je Zeile (Aufruf / Definition)
|
Wie eingegeben / Zusammenziehen / Umbrechen
|
Wie eingegeben
|
Ein Parameter pro Zeile
|
|
Vererbungsliste / Array-Init
|
… / Wenn zu lang
|
Wie eingegeben
|
Umbruch nur bei Überlänge
|
|
Rechter Rand (Spalte)
|
Ganzzahl
|
120
|
Schwelle für die „Wenn zu lang"-Automatik
|
Vertikaler Rhythmus: Die Faltungs-Obergrenze räumt gehäufte Leerzeilen immer auf; Struktur-Separatoren schaffen bei aktivem Reflow gezielt Luft.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Max. aufeinanderfolgende Leerzeilen
|
Ganzzahl
|
1
|
Faltet Leerzeilen-Folgen (wirkt immer)
|
|
Max. aufeinanderfolgende Leerzeilen
|
Ganzzahl
|
1
|
Leerzeilen zwischen Methoden
|
|
Max. aufeinanderfolgende Leerzeilen
|
Ganzzahl
|
1
|
Luft um Unit-Sektionen
|
Der Feinschliff für Freunde spaltiger Ordnung — komplett Opt-in: Zuweisungen, Typnamen, Konstanten und Zeilenend-Kommentare fluchten in einer Spalte.
|
Einstellungen
|
Werte
|
Standard
|
Wirkung
|
|---|---|---|---|
|
Zuweisungen / Konstanten / Typnamen …
|
An / Aus
|
Aus
|
Spaltige Ausrichtung je Kategorie
|
|
Zeilenend-Kommentare ausrichten
|
An / Aus
|
Aus
|
Nachgestellte Kommentare in einer Spalte
|
|
Max. Spalte
|
Ganzzahl
|
60
|
Obergrenze der Ziel-Ankerspalte
|
Der Feinschliff für Freunde spaltiger Ordnung — komplett Opt-in: Zuweisungen, Typnamen, Konstanten und Zeilenend-Kommentare fluchten in einer Spalte.
|
Einstellungen
|
Wirkung
|
|---|---|
|
Formatierung aktivieren
|
Globaler Ein-/Ausschalter für Strg+D, Menü und Kontextmenü
|
|
Importieren… (.config)
|
Liest Together-Profile aus Delphi 12 und älter — mit transparentem Import-Report
|
|
Exportieren… (.config)
|
Eigene Einstellungen als .config teilen
|
Discover more exciting tools from us
MSys Tool Suite is a modular plugin suite for RAD Studio 13. It extends the Delphi IDE with project-related task management, an AI interface via MCP, automatic SBOM generation, and productive IDE helpers.
A central dashboard for SBOM management, vulnerability monitoring, and compliance—within your infrastructure.