Skip to content

RADProgrammer Style Guide Code Formatter

Darian Miller edited this page Mar 14, 2021 · 1 revision
  • Utilize the RAD Studio source code formatter to help enforce a specific set of rules for enhanced clarity
  • Automatically format the currently selected text, the current file, or all units in the current project
  • A customized profile configuration file is available for download from GitHub
  • More info: Embarcadero docwiki page

Many configurable options are available in five main areas

IDE formatting feature introduced in Delphi 2010

The formatting feature was greatly expanded in Delphi XE

  • Formatting profiles introduced to Load/Save/Restore configuration files
    • User code formatting profiles are stored in %AppData%\Embarcadero\BDS\{version}
    • Default profiles are stored in \Program Files (x86)\Embarcadero\Studio\{version}\bin\config
    • XML configurations stored as Formatter_*.config
    • More info: Embarcadero docwiki page
  • New option added to format all units of the current project

Standalone formatter available for command-line usage

  • Utility: bin\formatter.exe
  • Can format a single file or use wildcard options to format all files recursively in the directory and all subdirectories
  • More info: Embarcadero docwiki page