A syntax-highlighting editor component for Delphi and C++ Builder, supporting both VCL (Windows) and FMX (cross-platform) frameworks.
Compatible with Delphi 12 Athens or later. You can also access the 11 Alexandria, 10.3 Rio, 10.2 Tokyo and 10.1 Berlin releases.
SynEdit is a syntax highlighting edit control, not based on the Windows common controls. It includes:
- 66 language highlighters (Delphi, C++, Python, JavaScript, HTML, XML, SQL, and many more)
- 189 Omni highlighter configurations for additional languages via INI-based definitions
- VCL editor (
TCustomSynEdit) — full-featured Windows editor with DirectWrite rendering, code folding, completion proposals, printing, spell check, OLE drag-drop, and accessibility - FMX editor (
TCustomFMXSynEdit) — cross-platform editor with FMX Canvas rendering, syntax highlighting, keyboard input, selection, multi-caret editing, word wrap, clipboard, undo/redo, file I/O, code folding, search/replace, completion proposals, OLE drag-drop, macro recording, plugin support, printing (abstract provider), and spell check (abstract provider)
All highlighters are shared between VCL and FMX — write once, highlight everywhere.
See What's New.md for detailed information on recent additions including:
- TSynDelphiSyn — Modern Delphi highlighter with multiline string literals, code folding, and Delphi 13 keyword support
- IDE Settings Importer — Design-time tool to import your Delphi IDE color scheme and editor preferences into SynEdit components
- Multi-Caret Editing — Multiple carets (Alt+Click), column selection (Alt+Shift+Arrows), select matching text (Ctrl+Shift+W), with shared architecture between VCL and FMX
- FMX Editor — Cross-platform FireMonkey editor with syntax highlighting, multi-caret editing, word wrap, clipboard, undo/redo, file I/O, code folding, search/replace, completion proposals, OLE drag-drop, macro recording, printing, spell check, and plugin support
SynEdit uses a three-layer architecture:
┌────────────────────┐ ┌────────────────────┐
│ Source/VCL/ │ │ Source/FMX/ │
│ 40 Vcl.* units │ │ 20 FMX.* units │
└─────────┬──────────┘ └─────────┬──────────┘
└──────┬───────────────-┘
│ uses
┌──────────▼──────────┐
│ Source/ (shared) │
│ 66 highlighters │
│ 189 Omni configs │
│ Core types & buffer │
└─────────────────────┘
- Shared (no prefix): Platform-independent units — highlighters, text buffer, types, key commands, spell-check providers
- VCL (
Vcl.*prefix): Windows-specific — DirectWrite, OLE, printing, accessibility - FMX (
FMX.*prefix): Cross-platform — FMX Canvas rendering, FMX scrollbars, FMX clipboard
See Architecture.md for the full technical reference including directory structure, package dependencies, unit scope resolution, build order, and contributor guidelines.
| Package | Type | Description |
|---|---|---|
| SynEditSharedDR | Runtime | Shared core — types, text buffer, 66 highlighters |
| SynEditDR | Runtime | VCL editor and supporting units |
| SynEditDD | Designtime | VCL component registration and property editors |
| SynEditFMXDR | Runtime | FMX editor and supporting units |
| SynEditFMXDD | Designtime | FMX component registration |
| Package | Type | Description |
|---|---|---|
| SynEditSharedCR | Runtime | Shared core |
| SynEditCR | Runtime | VCL editor |
| SynEditCD | Designtime | VCL component registration |
| SynEditFMXCR | Runtime | FMX editor |
| SynEditFMXCD | Designtime | FMX component registration |
Build order: Shared → VCL/FMX Runtime → VCL/FMX Designtime
TurboPack SynEdit is available via the GetIt Package Manager where you can quickly and easily install and uninstall it.
To manually install into your IDE:
-
Clone or unzip into a directory (e.g.,
d:\SynEdit). -
Start RAD Studio.
-
Add these directories to the IDE's library path:
Source— shared unitsSource\Highlighters— language highlightersSource\VCL— VCL editor unitsSource\FMX— FMX editor units (if using FMX)
For C++ Builder, also add the hpp subdirectory (e.g.,
Source\hpp\Win32\Release) to the IDE's system include path. -
Open and install the designtime packages from
Packages\11AndAbove\:- VCL: Build
SynEditSharedDR.dpk, thenSynEditDR.dpk, then installSynEditDD.dpk - FMX: Build
SynEditFMXDR.dpk, then installSynEditFMXDD.dpk
- VCL: Build
| Demo | Description |
|---|---|
| HighlighterDemo | Browse all language highlighters with sample source |
| EditAppDemos | SDI, MDI, and Workbook editors with file I/O and search/replace |
| CompletionProposalDemo | Code completion popup |
| Folding | Code folding with Delphi highlighter |
| SearchReplaceDemo | Find and replace functionality |
| SimpleIDEDemo | Mini IDE with editor and output pane |
| PrintDemo | Printing support |
| MarkdownViewer | Markdown rendering |
| SpellCheck | Windows spell-check integration |
| Demo | Description |
|---|---|
| HighlighterDemo | Browse 13 language highlighters with syntax coloring |
| EditApp | Single-document editor with menus, file I/O, clipboard, undo/redo, and auto highlighter detection |
| FeaturesDemo | Comprehensive feature showcase with options panel, search/replace, completion proposals, code folding, and event log |
Two DUnitX test suites run headless with FailsOnNoAsserts enabled and exact-value assertions throughout.
- FMX — 428 tests across 34 fixtures covering buffer, caret, code folding, commands, content, highlighter, options, search, undo/redo, spell check, bug-fix regressions, cross-platform fixes, word wrap, selection, clipboard, editing edge cases, color conversion, completion proposal logic, highlighter folding (Delphi, HTML, XML, CSS), auto-indent, pixel coordinate mapping, scrollbar sizing, bookmarks, gutter bands, multi-caret editing, drag-drop, macro events, hooked command handlers, and macro recording.
- VCL — 95 tests across 5 fixtures covering Hunspell provider, Windows spell-check COM provider, spell check component integration, drag-drop, and macro recording.
build_fmx_tests.bat
Test projects: Tests/FMX/FMXSynEditTests.dproj, Tests/VCL/VCLSynEditTests.dproj
- Delphi 12+ (RAD Studio 12+)
- Packages must be built in dependency order (see Architecture.md)
| Script | Description |
|---|---|
build_delphi.bat |
Build all Delphi packages (shared + VCL + FMX) |
build_all_win32.bat |
Build all packages for Win32 (Delphi + C++ Builder) |
build_vcl_demos.bat |
Build all VCL demo applications |
build_fmx_demo.bat |
Build FMX demo applications |
build_fmx_tests.bat |
Build FMX DUnitX test suite |
rsvars.bat
msbuild SynEditSharedDR.dproj /t:Build /p:Config=Release /p:Platform=Win32
msbuild SynEditDR.dproj /t:Build /p:Config=Release /p:Platform=Win32
msbuild SynEditFMXDR.dproj /t:Build /p:Config=Release /p:Platform=Win32
| Platform | Delphi | C++ Builder |
|---|---|---|
| Win32 | All packages | All packages |
| Win64 | All packages | Known ilink64 generics limitation |
See LICENSE for details. SynEdit is dual-licensed under the MPL 1.1 and LGPL 2.1+.