Sign in Join
Wiki copytemporary

IDE Window: Editor Options HighlightColors: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: IDE Window: Editor Options HighlightColors

OldNewLine
1+_**This is part of the online help for the IDE.**_
2+It describes the section: "Editor" / "Color and Highlight". You can open the described dialog in your IDE via:
3+
4+ * The menu: "Tools" => "Options" / Editor options ...
5+ * The source-editor pop-up menu: "Editor properties ...
6+
7+_**Navigation**_
8+
9+ * [[IDE Window: Editor Options|Editor Options]] Overview of all Editor Options
10+
11+| |
12+
13+ * [[IDE Window: IDE Options Dialog|IDE Options]] Overview of all options for the IDE
14+
15+
16+---|---|---
17+
18+* * *
19+
20+## Contents
21+
22+ * 1 About
23+ * 1.1 Color-Schemes
24+ * 1.2 Languages
25+ * 2 Quick overview of provided functionality
26+ * 2.1 Choosing Color-Schemes
27+ * 2.2 Editing Colors in a Scheme
28+ * 2.3 Exporting edited settings as a new Color-Scheme
29+ * 3 How Colors are determined
30+ * 3.1 "Default Text"
31+ * 3.2 Language specific colors
32+ * 3.3 Mark-up colors
33+ * 3.4 Global scheme settings
34+ * 3.4.1 The difference between "use global" and "Not modified"
35+ * 4 Settings
36+ * 4.1 Use syntax highlight
37+ * 4.2 Language
38+ * 4.3 Scheme
39+ * 4.4 File Extensions
40+ * 4.5 Export
41+ * 4.6 Element
42+ * 4.7 Set element to default
43+ * 4.8 Set all elements to default
44+ * 4.9 Text attributes
45+ * 5 User supplied schemes
46+
47+# About
48+
49+## Color-Schemes
50+
51+A color-scheme defines how to highlight text in different languages. It also defines how to highlight language independent mark-up, such as selected text.
52+
53+A color-scheme consists of
54+
55+ * A basic default color for text and the editors background color. Usually a single scheme uses the same "default colors" for all languages.
56+ * Individual color and style settings/modifications for language specific elements. For example pascal-keywords or XML-tags.
57+ * General color and style settings/modifications for mark-up. For example selected-text, matching-brackets, syncro-edit. Again usually for one scheme those colors are the same cross all languages supported by the scheme.
58+
59+## Languages
60+
61+Language refers to the content type of a file. Highlighting recognizes different types of content, such as pascal files, XML/HTML, LFM, diff-files and some other programming languages
62+
63+# Quick overview of provided functionality
64+
65+This dialog provides access to the following color and highlight related settings and functions
66+
67+## Choosing Color-Schemes
68+
69+Color-scheme are set individually for each language. This allows to highlight different languages with different schemes.
70+
71+To change the scheme for a language choose the language from the first drop-down, then choose the color-scheme in the 2nd drop-down.
72+
73+The color-scheme will be applied to all files of this language. The language of a file is detected by the file-extension. The list of extensions can be chosen or edited in the 3rd drop-down.
74+
75+## Editing Colors in a Scheme
76+
77+Individual colors and styles in any scheme can be edited. Changes like this will be applied to all files (that are of a language which is) using the scheme.
78+
79+More details of how to edit colors and styles can be found below.
80+
81+## Exporting edited settings as a new Color-Scheme
82+
83+Modified color-schemes an be exported to an XML file (using the export button). Such an XML file can then be distributed.
84+
85+To make the exported scheme available, the XML file must be copied into a folder called "userschemes" located in the primary config path of Lazarus. The scheme from the XML file will then appear in the scheme-drop-down.
86+
87+To locate where your configuration directory is, within the Laz IDE, click on View> IDE Internals> About IDE. Place the userchemes directory where "Primary config directory" points to.
88+
89+# How Colors are determined
90+
91+## "Default Text"
92+
93+The base color (fore and background) used to display any text. All other colors act as modification to this color pair.
94+
95+Language-specific and Mark-up colors are based on the "default text" colors. They only specify Attributes that need to be modified. (e.g. pascal keywords are bold, otherwise using the default colors) This allows to change the default color and all elements will follow to the new setting (unless they have a modified fore/background color)
96+
97+## Language specific colors
98+
99+Specify colors or styles for language specific elements.
100+
101+ Any color set to "not modified" uses the "default text" setting.
102+ The default for styles is no-style (not bold, not italic, ...).
103+
104+An exception is the style/color for pascal "Case label". It modifies the style of the underlying pascal element, which can be String, Number or Identifier. If those make no modification, then the default come from the "default text" again.
105+
106+For this reason "Case label" has extended style settings like "mark-up" colors (see there).
107+
108+## Mark-up colors
109+
110+Specify colors for all forms of mark-up (text-selection, brackets, ...)
111+
112+The modifications made by mark-up settings are applied on top of those made by the language specific settings. They may even be applied on top of other mark-up settings, if several mark-ups apply to a text. (e.g. selected text with bracket highlight in selection)
113+
114+Since they modify text that can already have styles (e.g language specific settings may display pascal keywords/comments in bold), they allow to either force a style on/off or invert it's current state.
115+
116+E.g Bracket Highlight inverts bold:
117+
118+ * A bracket in pascal source is normally not bold, but will be bold if highlighted as part of bracket-pair highlight
119+ * A bracket in a pascal comment is normally bold, but will be none bold if part of a bracket pair highlight
120+
121+## Global scheme settings
122+
123+Most colors can be set globally for the whole scheme or have language specific settings. Using the global-scheme default allows to quickly change a setting for all languages.
124+
125+Global settings are available for the "default text" and for all "mark-up" settings. They can be switched off on a per language base, allowing to specify a language specific exception for some or all of those colors.
126+
127+Note
128+ If the "Use global scheme settings" check-box is checked for any settings, then the colors shown and editing are the global colors. Changes will affect all languages.
129+
130+### The difference between "use global" and "Not modified"
131+
132+ * "not modified" always refers to the color/style the text has according to the language specific setting, or settings already applied to it.
133+
134+ (Block-selection may act on default text, on pascal-comment, or even on bracket pair highlight.)
135+ "not modified" does not mean to take the color from the global scheme settings.
136+
137+ * "use global" means that the values for all colors styles of the selected element will be determined according to global settings. The global settings will be treated as if they where local).
138+
139+ global settings can them self specify "not modified, in which case the color will be chosen from the languages upward settings.
140+
141+# Settings
142+
143+## Use syntax highlight
144+
145+Use colors and styles for different tokens.
146+
147+## Language
148+
149+Set here the highlighter you want to edit.
150+
151+## Scheme
152+
153+The IDE has some predefined color schemes - sets of colors. Choose here one you like, then edit the single elements.
154+
155+## File Extensions
156+
157+You can edit the file extensions for which the IDE uses this highlighter.
158+
159+## Export
160+
161+Creates an XML file with the selected scheme (for all languages).
162+
163+This file can be distributed. Users can copy it into the sub-folder "/userschemes/" in their config directory. It will be detected, when the IDE is started
164+
165+## Element
166+
167+This listbox contains all elements of the current highlighter. Choose which to edit. Or click on the preview below to select the element.
168+
169+## Set element to default
170+
171+Load the default colors for this element from the current highlighter and scheme.
172+
173+## Set all elements to default
174+
175+Load the default colors for the current highligher and scheme.
176+
177+## Text attributes
178+
179+Check the 'Use default color' checkboxes to get the color button. Then click on the button to select a custom color.
180+
181+# User supplied schemes
182+
183+[[UserSuppliedSchemeSettings|User supplied scheme settings]]
184+
185+---
186+*From the Free Pascal wiki, page "IDE Window: Editor Options HighlightColors", as the Internet Archive kept it on 2025-02-12. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history