Behavior & Display preferences

Set preferences for the behavior and display aspects of the Code Editor.

Language

You can set language preferences for all languages, then overwrite preferences for specific languages.

To set preferences for all languages, select All Languages.

To set preferences for a specific language, select the language using the Language combobox, then select the Use custom settings checkbox. This box must be checked to make any changes in the settings for the selected language. The language is identified as having a custom setting by the additon of a pencil icon next to the language name.

When you select a language, changes to preferences will only apply to that language.

Behavior preferences tab

Tabs:

  • Tab size - Size of tab in characters.
  • Insert spaces for tab - If selected, tab size whitespaces are inserted into the document instead of the tab character when the Tab key is pressed.

Indentation:

  • Smart tab - If selected, Code Editor will move the cursor to align with the first character following a whitespace on the previous non-blank line, when the Tab key is pressed.
  • Smart backspace - If selected, Code Editor will backspace intelligently through whitespace.
  • Smart indent - If selected, Code Editor will indent code based on the indentation of the previous line. New lines are indented to the first non-blank character of the line above.
  • Strip trailing white spaces during edit - If selected, Code Editor will remove all trailing whitespace from the file when the file is being edited.

Automatically Close:

If selected, the closing symbol will be added to each of these:

  • String " "
  • Single quotes ' '
  • Parenthesis ( )
  • Curly braces { }
  • Square brackets [ ]
  • Angular brackets < >

Smart Key Options:

  • Smart home - If selected, the Home key moves the cursor to the left of the first non-blank character on the line.
  • Smart end - If selected, the End key moves the cursor to the right of the last non-blank character on the line.

Copy Options:

  • Copy whole line when no selection - If selected, the entire line is copied when you choose Copy and nothing is selected.

New Document Format:

Sets the default line ending for new text documents:

  • Windows® - Use the CRLF end-of-line format, as used by Windows® and most other early non-UNIX® and non-IBM operating systems.
  • UNIX/Mac® - Use the LR end-of-line format, as used by UNIX-like systems including macOS™.
  • Mac 9 - Use the CR end-of-line format, as used by Mac OS up to version 9.

Display preferences tab

Editor:

  • Show line numbers - If selected, Code Editor displays line numbers.
  • Show right margin - If selected, Code Editor displays a thin line on the right side to indicate the right margin. The spinner sets the column number where the right margin line will be located, in characters.
  • Show indentation guide - If selected, Code Editor displays vertical lines that indicate relative indentation of text.

Highlighting:

  • Current line - If selected, Code Editor highlights the line that contains the cursor.
  • Brace match - If selected, Code Editor highlights both of the enclosing glyphs in a set when the cursor is immediately to the right of one of the glyphs. The glyphs involved (parentheses, curly braces, square brackets, or angle brackets) are language-dependent. With Genero BDL, parentheses and square brackets are highlighted, while curly braces denote comments and are not highlighted.
  • Highlight all occurrences on selection - If selected, Code Editor highlights all occurrences of the current selection. The search is case-insensitive.

Wrapping:

  • Line wrapping - If selected, line wrapping is enabled.

Language Specific preferences tab

The Language Specific tab is only enabled when a language has specific options to set. It is never enabled for All Languages. If you select a language and the tab is not enabled, then there are no language-specific preferences to set.

Code Beautifier

The Code Beautifier tab sets the rules to be followed when the code beautifier tool is used.
  • Column limit - Set the column limit. This sets the source line width limit by providing the value for the --fo-column-limit compiler option.
  • Indent width - Set the indent width. This sets the number of columns used for indentation by providing the value for the --fo-indent-width compiler option.
  • Continuation indent width - Set the continuation indent width. This sets the indent width for line continuations by providing the value for the --fo-continuation-indent-width compiler option.
  • Indent instruction clauses - Select to indent instruction clauses. This boolean option identifies whether to indent instruction clauses by providing the value for the --fo-label-indent compiler option. A value of 1 indents instruction clauses.
  • Pack - Select to pack. This boolean option identifies whether to try and put as much as possible onto the same line by providing the value for the --fo-pack compiler option. A value of 0 uses one line for each item.
  • Indent on save - Indent on save. This boolean option specifies whether to automatically apply the formatter when saving Genero source (.4gl) files.

See Format and indent with the code beautifier tool