IDE Window: Codetools Options

From Free Pascal wiki
Jump to navigationJump to search

Deutsch (de) English (en) français (fr)

General

Additional Source search path for all projects/packages

If 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.

Jumping

  • 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.
  • 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.
  • 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.
  • 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.

Indentation

Since 0.9.29 the source editor has a smarter auto indenter for pascal. 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.

  • 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.
  • On paste form clipboard: Indent when copying text from the clipboard. At the moment it only indents when inserting at column 1.
  • 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.
  • 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.

Code Creation

Class part insert policy

Insert new variables and method to the class declaration:

  • Alphabetically
  • Last

Method Insert policy

Where to insert new method bodies.

  • Alphabetically
  • Last
  • Class order: Use the same order as in the class declaration

Procedure insert policy

Where to insert new procedure bodies

  • Last (at end of source)
  • in front of methods
  • behind methods

Keep order of procedures

When inserting new procedure bodies, keep order of the interface.

Header comment for class

Add a header comment in front of the class. For example { TForm }

Property completion

  • Complete properties: Enable to complete incomplete property declarations.
  • Read Prefix
  • Write Prefix
  • Stored Prefix
  • Variable Prefix
  • Set property Variable

Words

Keyword policy

How to write new keywords.

Identifier policy

How to write new identifiers.

Line Splitting

Space