Difference between revisions of "IDE Window: Editor Options"

From Free Pascal wiki
Jump to navigationJump to search
Line 26: Line 26:
 
*Font
 
*Font
 
*Line-spacing
 
*Line-spacing
 +
 +
= Colors =
 +
<h3>Please go to [[IDE_Window:_Editor_Options_HighlightColors|Color and Highlight settings]] for options regarding:</h3>
 +
* Highlighting Pascal/Language specific elements
 +
* General Highlighting (Selection, Line Highlights, ...)
 +
 +
= Markup and Matches =
 +
<h3>Please go to [[IDE_Window:_Editor_Options_Markup|Markup and Matches]] for options regarding:</h3>
 +
* Highlight other occurences of the current word
 +
* Matching brackets
 +
* Extended Pascal-Keyword settings
  
 
= Key Mappings =
 
= Key Mappings =
Line 56: Line 67:
 
== See [[IDE_Window:_Editor_Options_Mouse|Mouse settings]] ==
 
== See [[IDE_Window:_Editor_Options_Mouse|Mouse settings]] ==
  
= Colors =
 
 
== See [[IDE_Window:_Editor_Options_HighlightColors|Color and Highlight settings]] ==
 
  
= Automatic Features =
+
= Completion and Hints =
  
== Auto remove empty methods ==
+
=== Auto remove empty methods ===
  
 
Published methods without code are automatically removed on save. For example: When you double click on a form the IDE creates the published method FormCreate. When this is option is enabled and the method is still empty the IDE will remove it when you save the form.
 
Published methods without code are automatically removed on save. For example: When you double click on a form the IDE creates the published method FormCreate. When this is option is enabled and the method is still empty the IDE will remove it when you save the form.
  
== Tooltip symbol Tools ==
+
=== Tooltip symbol Tools ===
  
 
When the mouse moves over an identifier in the source editor and waits a few seconds the IDE will present a hint with some informations.
 
When the mouse moves over an identifier in the source editor and waits a few seconds the IDE will present a hint with some informations.
  
== Complete blocks ==
+
=== Complete blocks ===
  
 
Complete blocks. For example, when you type ''begin'' and press return the IDE will automatically add the ''end;''.
 
Complete blocks. For example, when you type ''begin'' and press return the IDE will automatically add the ''end;''.
 
This feature exists since 0.9.27.
 
This feature exists since 0.9.27.
  
== Tooltip expression evaluation ==
+
=== Tooltip expression evaluation ===
  
 
During debugging the tooltip hint will try to evaluate the expression at the cursor.
 
During debugging the tooltip hint will try to evaluate the expression at the cursor.
Line 82: Line 90:
  
 
Set here the waiting period before the hint pops up.
 
Set here the waiting period before the hint pops up.
 
== Markup ==
 
 
There are a couple of options to control the current-word-markup
 
feature. They are on the "Automatic feature" page of the editor option
 
(plus color settings on the color page)
 
 
Note: If you have a block selected, the selected block will be used as
 
term to highlight, rather than the word under caret.
 
Some settings are only for block, others only for current-word
 
 
1) You can change the time after which highlighting kicks in. You can
 
also disable the Timer completely, in which case you can still toggle
 
Highlighting by Keyboard
 
 
2) Toggle by Keyboard (default Alt-M)
 
You can toggle the highlight to any chosen word, or selection by
 
pressing Alt-M while at the word, or while having selected the desired
 
block.
 
Pressing Alt-M again will set the "fixed" word to the word at your new
 
location. To untoggle, press Alt-M twice at the same location
 
(The exact behaviour is: If your current selected block, or (if no block
 
selected) the current word under cursor is the same term as the word you
 
toggled-fixed, this will clear the fixed word. Otherwise the fixed word
 
will be set)
 
 
3) You can ignore Keywords. This is a hardcoded list of Keywords, and
 
will ignore them even if they are used in a context where they would not
 
be seen as Keyword. The list comes from the highlighter, so this only
 
works together with the highlighter.
 
 
4) for current-word only:
 
You can choose to only highlight exact matches(match word boundaries)
 
instead of any occurrence including occurrences in other words. By
 
Default this applies to words shorter than 3 chars.
 
 
For example:
 
Set option to true and field to 3.
 
 
If the word at caret is the 3 letter word 'laz' then all 'laz' will be marked, but not 'lazarus' or 'blaz'.
 
 
If the word at caret is the 4 letter word 'laza' then all words including 'laza' will be marked, such as 'lazarus'.
 
 
 
5) blocks only:
 
by default leading/trailing spaces are ignored/stripped from the search term
 
 
To disable the feature completely:
 
Set all colors (FG,. BG and Frame) to default (check the tickbox); make
 
sure no Styles (bold, italic) are selected.
 
 
This will be recognized, and the Editor is clever enough and will not
 
even trigger the search for other words.
 
 
== Bracket Highlight ==
 
 
If the cursor is behind or in front of a bracket, highlight matching bracket
 
  
 
= Code folding =
 
= Code folding =

Revision as of 04:03, 30 October 2010

Deutsch (de) English (en) español (es) suomi (fi)

You can get this dialog via:

  • Menu / Environment / Editor options ...
  • Source editor / popup menu / Editor properties ...

General

Please go to Editor Options General for options regarding:

  • Undo / Redo
  • Scrolling
  • Indent and Tabs
Please also see Codetools for automatic indent of Pascal sources
  • The Caret (Text-cursor)
  • The block-selection

General / Misc

Please go to Editor Options General Misc for options regarding:

  • Showing Withespace
  • Trimming spaces
  • Copy/paste: unselected / fold
  • Search

Display

Please go to Editor Options Display for options regarding:

  • Gutter / Margin
  • Font
  • Line-spacing

Colors

Please go to Color and Highlight settings for options regarding:

  • Highlighting Pascal/Language specific elements
  • General Highlighting (Selection, Line Highlights, ...)

Markup and Matches

Please go to Markup and Matches for options regarding:

  • Highlight other occurences of the current word
  • Matching brackets
  • Extended Pascal-Keyword settings

Key Mappings

See Lazarus IDE Shortcuts.

Filter

At the top there is an edit field to set a text filter. You can type some letters and the tree will be updated to show only those keys which description contains the word. Set empty to show all.

Tree of IDE shortcuts

Here you can see all commands and shortcuts of the IDE. Click on one of the keys to popup a dialog to edit the shortcut.

Find key combination

Click on the button to show a dialog. Grab a key and press ok. The tree will then only show those keys that start with the shortcut. Select VK_UNKNOWN to show all.

Choose scheme

Load one of the predefined key mappings. This will replace all your shortcuts.

Check consistency

Search for double defined keys.

Mouse

See Mouse settings

Completion and Hints

Auto remove empty methods

Published methods without code are automatically removed on save. For example: When you double click on a form the IDE creates the published method FormCreate. When this is option is enabled and the method is still empty the IDE will remove it when you save the form.

Tooltip symbol Tools

When the mouse moves over an identifier in the source editor and waits a few seconds the IDE will present a hint with some informations.

Complete blocks

Complete blocks. For example, when you type begin and press return the IDE will automatically add the end;. This feature exists since 0.9.27.

Tooltip expression evaluation

During debugging the tooltip hint will try to evaluate the expression at the cursor.

Delay

Set here the waiting period before the hint pops up.

Code folding

Define which constructs in your source can be folded. See Code Folding

Divider Draw Level

  • Lazarus 0.9.26
This option will draw a horizontal line based on the code folding level you specified.
Example:
  • If you set this option to 1, the editor will draw a horizontal divider line in the editor after the 'end' keyword of each method. This is very handy if you want a visual cue where methods start and end.
  • If you set this option to 2, it will draw another horizontal line after the 'end' keyword of any nested begin..end block inside methods.
  • The higher you set the value the more nested begin..end blocks will be included.
  • Lazarus 0.9.28

Allows to draw a vertical line at the end of selected structures. E.g draw a line after each procedure. See Divider drawing

Multi Window

please see IDE_Window:_Editor_Options_MultiWindow