This is a fork of the PyScripter version of SynEdit. Following the passing of Kiriakos Vlahos, we decided to maintain our own fork so that the control continues to evolve and stay supported.
- Introduction
- Features
- Requirements
- Installation
- Package names
- Demos
- Documentation
- Highlighters
- Contributing
- License
- Acknowledgements
SynEdit is a syntax-highlighting edit control that is not based on the Windows common controls — it is a fully custom-drawn editor written in Object Pascal. It powers editors such as PyScripter and many other Delphi applications that need a capable code editing surface.
SynEdit is compatible with both Delphi and C++ Builder; however, this fork is currently developed and tested with Delphi only.
- Syntax highlighting — 60+ built-in highlighters covering most popular languages, plus a multi-highlighter for mixed content (e.g. HTML with embedded scripts).
- Code folding — fast, lag-free folding for files with tens of thousands of lines. See Doc/CodeFolding.md.
- Multiple cursors & selections — VS Code–style multi-caret editing and column/block selection. See Doc/Multi-caret.md.
- Code completion — completion proposal and parameter hint popups (
SynCompletionProposal). - Search & replace — incremental search, regular expressions, and scope-aware replace across multiple selections.
- Spell checking — built-in
SynSpellCheckcomponent. - Auto-correct — configurable text replacement as you type (
SynAutoCorrect). - Modern rendering — DirectWrite-based text rendering (
SynDWrite) for crisp fonts and high-DPI displays. - Word wrap, bookmarks, line indicators, a customizable gutter with line numbers, and drag & drop support.
- Printing & print preview with configurable headers, footers and margins.
- Export to HTML, RTF and TeX.
- Data-aware editing via
SynDBEdit.
- RAD Studio / Delphi 10.4 Sydney or later (tested through Delphi 13.0).
- Platforms: Win32, Win64, and Win ARM64EC (Delphi 13).
Code folding and multi-caret editing rely on generic collections and therefore require Delphi 2009 or later. The current packages target 10.4+.
Using DPM (recommended)
In your project folder:
dpm install VSoft.SynEdit
Or install it via the DPM IDE plugin. This adds the VSoft.SynEdit package to your project search path. The design-time components are loaded automatically when you open your project in the IDE.
- Add the Source and Source\Highlighters directories to the IDE's library path or to your project's search path.
- Open and install the design-time package for your IDE version from the matching folder under Packages/. The IDE will notify you once the components are installed.
SynEdit packages follow this naming convention:
| Package | Description |
|---|---|
SynEditDR.bpl |
Delphi Runtime |
SynEditDD.bpl |
Delphi Design-time |
Packages for each supported IDE version live under Packages/ (e.g. RAD Studio 12.0, RAD Studio 13.0).
The Demos/ folder contains sample projects that showcase the main features:
| Demo | Demonstrates |
|---|---|
EditAppDemos |
SDI, MDI and workbook-style editor applications |
SimpleIDEDemo |
A minimal IDE-like editor |
HighlighterDemo |
Switching between the built-in highlighters |
Folding |
Code folding with JScript, Python and C++ files |
CompletionProposalDemo |
Code and parameter completion popups |
SearchReplaceDemo |
Search & replace, including multiple selections |
SpellCheck |
The SynSpellCheck component |
PrintDemo |
Printing and print preview |
MarkdownViewer |
Rendering Markdown using SynEdit |
- Code folding — adding and using folding support.
- Multi-caret editing — internals, new commands, and compatibility notes.
SynEdit ships with highlighters for a wide range of languages and file formats, including:
Pascal/Delphi, C/C++, C#, Java, JavaScript, JSON, Python, Ruby, Perl, PHP, HTML, XML, CSS, SQL, YAML, INI, Batch, Bash/Shell, VB/VBScript, Fortran, Cobol, Haskell, Assembler, TeX, Inno Setup, DOT, LLVM, WebIDL — and many more.
The full set of highlighters lives in Source/Highlighters/. You can also combine highlighters with SynHighlighterMulti for files that mix languages.
Contributions are welcome! Please open an issue to discuss significant changes before submitting a pull request. Bug reports and feature requests can be filed on the issue tracker.
SynEdit is distributed under the Mozilla Public License 1.1 (MPL 1.1). Alternatively, you may use and redistribute it under the terms of the GNU Lesser General Public License (LGPL) 2.1 or later. See LICENSE for details.
SynEdit has a long history and is the work of many contributors over many years. This fork builds directly on the excellent PyScripter fork by the late Kiriakos Vlahos, whose work advanced this control what it is today.