Line Endings
Go Up to Editor Options
Tools > Options > Editor > Line Endings
This page has settings that allow you to control the normalization of file line endings for files opened in the Code Editor. RAD Studio requires CRLF line endings (Windows standard) and can detect and normalize when a file is not consistently CRLF, but has a mix of different endings, such as CRLF and LF within the same file.
Despite RAD Studio requiring CRLF for all files, a file that has consistent non-CRLF line endings, such as always using LF, is not normalized to CRLF. The settings on this page only apply to files that have mixed endings within the one file. The most common cause for LF files on Windows is misconfigured source control. For the git source control system, use the core.autocrlf setting as noted in the git documentation.
Read-only files will never be modified. The Messages pane will contain a message for every file seen that has mixed line endings, including if read-only, as well as what action if any was taken.
Item | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Inconsistent line endings |
Choose how to handle inconsistencies with line endings in the Code Editor. The settings apply whenever RAD Studio opens a file and detects a mix of different line endings.
| ||||||||
Known extensions |
Lists file types by file extension which the IDE will normalize when opening, when Convert files with known extensions to CRLF (above) is selected. This allows you to restrict which files the IDE attempts to normalise, and by default is set to the common Delphi and C++ file extensions. You can Add, Replace, Delete, or re-organize your list of known extensions. | ||||||||
Ignore folders (including subfolders) |
Opens the Directories dialog box where you can edit your ordered list of ignored paths. Add paths here when you know you have files or source code that you never want to be modified, such as third party source code. Files will be ignored if they are in any path specified here, including any subfolder of that path. |