Sign in Join
Wiki copytemporary

IDE Window: Codetools Options: what changed

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

OldNewLine
1-<img src="IDE-options-codetools.JPG" title="Codetool options" width="400" />
1+![](/wiki-images/9/9f/IDE-options-codetools.JPG)
22
33## General
44
55### Additional Source search path for all projects/packages
66
77If you are too lazy to setup packages and you do not want to share your projects/packages, then you can set here a global search path. Please note: "global" refers to codetools, and does not include the settings for the compiler. You have to add the path to the fpc.cfg as well.
88
99### Jumping (e.g. Method Jumping)
1010
1111- **Adjust top line due to comment in front**: When jumping from method declaration to method body, the IDE tries to position the source editor, so that the top line shown in the editor is the first line of the procedure. Normally a comment in front belongs to the procedure as well. Enable this option to scroll so that the comment is shown too.
1212
1313- **Center cursor line**: If jumping from the method body to the declaration in the class (or interface) the IDE can center line vertically in the editor.
1414
1515- **Cursor beyond EOL**: When the IDE jumps to a new position it is allowed to jump to a nice position, even if this is beyond the end of the line. This must be enabled for the source editor too.
1616
1717- **Skip forward declarations**: When doing a *find declaration* the codetools searches upwards and stops on the first fit. This might be a forward declaration, e.g. *TControl = class;*. If this option is enabled the codetools will jump to the real class declaration instead.
1818
1919- **Jump directly to method body**: When *Find declaration* jumps to a method/procedure declaration it takes an extra jump to the implementation.
2020
2121### Indentation
2222
2323Since 0.9.29 the source editor has a smarter auto indenter for pascal. It imitates your indentation. For example when you press return after a *try* the indenter will search for other *try..finally* blocks and indents accordingly. When pasting code from the clipboard the indenter will indent it too.
2424
2525- **On break line**: Indent when pressing return and breaking the line. If disabled the default indenter of synedit is used, which indents as the line above.
2626
2727- **On paste form clipboard**: Indent when copying text from the clipboard. At the moment it only indents when inserting at column 1.
2828
2929- **Context sensitive**: The indenter searches in the surrounding code for similar code and copies the indentation. This means it searches first the code in front, then the code below. If it is a project unit, all project units are searched. If it is a package unit all package units are searched. Finally the example file is searched. If this option is disabled only the example file is searched.
3030
3131- **Example file**: This file contains beautiful code examples. You can edit the default file or select another. It can be a unit or program source.
3232
3333For a detailed explanation see [[Fully automatic indentation]].
3434
3535## Class Completion
3636
3737### Insert class part
3838
3939Defines where to insert new variables and method to the class declaration:
4040
4141- Alphabetically
4242- Last
4343
4444### Insert methods
4545
4646Where to insert new method bodies. Methods of the same class are always grouped together.
4747
4848- Alphabetically
4949- Last
5050- Class order: Use the same order as in the class declaration
5151
5252### Method default section
5353
5454What class visibility should be used for new methods by default (since 1.8).
5555
5656- Private
5757- Protected
5858- Public
5959- Published
6060
6161### Flags
6262
6363- Mix methods and properties: When adding a new method allow to insert between properties.
6464- Update all method signatures:
6565 - Enabled: Class completion updates all method signature (i.e. case, modifiers) from declaration to implementation.
6666 - Disabled: Class completion updates only the method signature under the cursor.
6767- Header comment for class: Add a *{ TYourClass }* comment in front of type.
6868- Implementation comment for class: Add a *{ TYourClass }* comment in front of the first method body.
6969
7070### Header comment for class
7171
7272Add a header comment in front of the class declaration. For example { TForm }
7373
7474### Implementation comment for class
7575
7676Add a comment in front of the first method body. For example { TForm }
7777
7878### Property completion
7979
8080- Complete properties: Enable to complete incomplete property declarations.
8181- Read Prefix - the 'Get' in 'function GetColor: TColor'
8282- Write Prefix - the 'Set' in 'procedure SetColor(aValue: TColor)'
8383- Stored Prefix - the 'IsStored' in 'function IsStoredColor';
8484- Variable Prefix - The new private variable name is this prefix plus property name, e.g. the 'F' in 'FColor'.
8585- Set property Variable - the parameter name for the setter, e.g. the 'aValue' in 'procedure SetColor(aValue: TColor)'.
8686 - is prefix - enable to use aValueColor instead of aValue as parameter name. e.g. 'procedure SetColor(aValueColor: TColor)'.
8787 - use const - enable to use the 'const' accessor for the parameter. e.g. 'procedure SetColor(const aValue: TColor)'.
8888
8989## Code Creation
9090
9191In this section you can define, where (and in which order) new procedures and units will be inserted.
9292
9393### Procedure insert policy
9494
9595Where to insert new procedure bodies
9696
9797- Last (at end of source)
9898- in front of methods
9999- behind methods
100100
101101### Keep order of procedures
102102
103103When inserting new procedure bodies, keep order of the interface.
104104
105105## Words
106106
107107### Keyword policy
108108
109109How to write new keywords.
110110
111111### Identifier policy
112112
113113How to write new identifiers.
114114
115115## Line Splitting
116116
117117## Space
118118
119119## Identifier completion
120120
121121See the tutorial [[Lazarus IDE Tools|Identifier completion]].
122122
123123### Add semicolon
124124
125125Allow to add missing semicolon. For example:
126126
127127``` pascal
128128 s:=Caption| //
129129```
130130
131131will add a semicolon. It does not add a semicolon if the identifier is a L-Value like in the following example:
132132
133133``` pascal
134134 Button1|
135135```
136136
137137### Add assignment operator
138138
139139This will add a **:=** if the identifier is a L-Value with no sub identifiers. For example:
140140
141141``` pascal
142142 Caption| // Caption is a string, so Caption:=
143143```
144144
145145### Automatically invoke after point
146146
147147If enabled the identifier completion is automatically shown, when user pressed a point *.* and waited for the time shown in Editor / Automatic Features / Tooltip expression evaluation. For example:
148148
149149``` pascal
150150 Button1.| // typing the point and wait will show the completion box
151151```
152152
153153### Add parameter brackets
154154
155155### Replace whole identifier
156156
157157- Enable: replace the whole identifier at cursor
158158- Disable: replace only the identifier in front of the cursor
159159
160160---
161161*From the Free Pascal wiki, page "IDE Window: Codetools Options", as it stood on 2020-02-17 after a change by Trev, out of the wiki's dump of 2024-05-26. 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