Maintaining Editor Options

You can configure the JADE editor pane with the settings that you require for the JADE development environment. For details about the JADE installation default display of JADE elements in the editor pane, see "Using the Editor Pane", in Chapter 3.

Use the Editor Options sheet to change the default editor pane behavior.

To change the default editor options

  1. Click the Editor Options sheet of the Preferences or JADE Installation Preferences dialog. The Editor Options sheet of the Preferences dialog is then displayed.

  2. In the Entry Options group box, check the:

    1. Use Smart Indent check box if you want the caret indented one tab position when a new line is inserted and the previous non-blank line begins with one of the JADE smart words. The JADE smart words are constants, vars, begin, epilog, if, elseif, foreach, and while.

    2. Use Tabs For Indent check box if you want to insert tabs for indenting (the default value). When you uncheck this control, the appropriate number of spaces is inserted instead of tab characters for editor pane indentation.

  3. In the Folding Options group box, select the Normal or Compact option button if you want the option to hide lines in the editor pane by using fold points. By default, folding is not enabled; that is, the None option button is selected.

    Select the Normal option button if you do not want folding to include the terminating line or the Compact option button if you want folding to include the terminating line. When you select normal or compact folding, folded lines are indicated by a line drawn below the folded line and a square symbol in the left margin of the line, which you can use to make folded lines in the editor visible or invisible.

    For details about folding multiple-line comments, see "Using Comments in Your Methods", in Chapter 1 of the JADE Developer's Reference.

  4. In the Auto Complete group box, check the:

    1. Use AutoComplete check box if you want to enable the JADE AutoComplete functionality, which is on by default. AutoComplete functionality is turned on (that is, the check box is checked) when you click the Defaults button on the Preferences dialog.

      The JADE AutoComplete functionality:

      • Reduces the amount of typing required to define a JADE method.

      • Provides a list of selectable suggestions for what is being entered in the context of the current expression. The list contents depend on the context, and can include JADE instruction, package names, global constants, classes, properties, methods, and constants.

      • Provides the ability to investigate the type of any entity by hovering the mouse over an entity.

      For details, see "Using JADE AutoComplete Functionality", earlier in this chapter.

    2. Insert Parentheses for Method with no parameters check box if you want parentheses automatically inserted for a method that has no parameters.

      The opening and closing parentheses for a method call are automatically added to the text when the following are true.

      1. The Insert Parentheses for Method with no parameters check box is checked.

      2. A method name is selected from the auto complete list, by pressing a semicolon (;), dot (.), or space key.

      3. The method does not have any parameters.

      For example, if you type customer.initi and you select initialized from the auto complete list by pressing the ; character, the result is:

      customer.initialized();
    3. Use History for Selection check box if you want a prior selection (depth of 10) whose prefix matches the text entered in the editor pane selected by default. If there is no prior history that matches the specified text, AutoComplete operates as though the value of the check box is false (that is, it is unchecked).

      When this check box is unchecked, the entry selected in the AutoComplete list is always the first name with the prefix matching the text entered in the editor pane. The history of previously‑selected AutoComplete entries is not used, and you must type more of the identifier name to locate the required entry in the list box or select the required entry using an arrow key or the mouse.

    4. Perform Method Error Analysis check box if you want the JADE editor to perform error analysis of the method definition as you modify the method, which makes you aware of issues before you compile the method. This check box is checked, by default.

      When an error is detected, the text in error is decorated with a red wavy underline symbol. Hovering the mouse over such text displays a bubble help entry with a brief description of the error.

      For details, see "Method Definition Error Analysis", earlier in this chapter.

  5. In the Display Options group box, check the:

    1. Caret Finder check box if you want to locate the caret in the editor pane. When the Caret Finder check box is checked and you press Ctrl, a large vertical rectangle of the defined caret color then flashes twice at the caret position. By default, the caret finder is not enabled.

    2. Use Wrap for Text Windows check box if you want lines of text that exceed the viewable screen to be wrapped in windows that display the Text value of classes, properties, and so on. By default, lines of long text are not wrapped.

      When you check this control, lines are broken after space or tab characters. However, if a word is wider than the editor pane, the break occurs after the last character that completely fits on the line. When wrap mode is enabled, the horizontal scroll bar is not activated.

      New line characters are not inserted in the text at the wrapping point. Wrapping brings into view the right-hand side of long lines that are normally outside the display area.

      When you enable text wrapping and you want an indication when a line reaches a specified length (for example, as a format convention that limits lines to 80 characters), see the edge mode options in step 5 of this instruction.

    3. Use Wrap to Source Windows check box if you want lines of source code that exceed the viewable screen to be wrapped in windows that display source code. By default, lines of long source code are not wrapped.

      When you check this control, lines are broken after space or tab characters. However, if a word is wider than the editor pane, the break occurs after the last character that completely fits on the line. When wrap mode is enabled, the horizontal scroll bar is not enabled.

      New line characters are not inserted in the code at the wrapping point. Wrapping brings into view the right-hand side of long lines that are normally outside the display area.

      When you enable code wrapping and you want an indication when a line reaches a specified length (for example, as a format convention that limits lines to 80 characters), see the edge mode options in step 5 of this instruction.

    4. View Line Numbers check box if you want to display line numbers for each line in the editor pane. By default, line numbers are not displayed.

    5. View End Of Line Characters check box if you want to display end of line characters in the editor pane. By default, end of line characters are not displayed.

    6. View Whitespace check box if you want to display spaces as small centered dots and tabs as arrows. By default, whitespace is displayed as an empty background color.

    7. View Indent Guidelines check box if you want to display vertical indentation guidelines in the editor pane. By default, indentation guidelines are not displayed.

    8. View Status Line Info check box if you want to show editor information in the status line of the background window. By default, editor information is not displayed in the status line.

      When this check box is checked, the editor pane information in the status line of the background window displays a field made up of the line number in which text is selected, the position of the first selected character, and the number of selected characters; the row and column positions; Insert or Overtype mode; and whether Caps Lock, Num Lock, and Scroll Lock are active.

    9. View Caret Line Color check box if you want to highlight the line in which the caret is positioned with the color specified for the caret line in the editor pane. By default, the caret line is not highlighted.

    10. Only highlight whole words matching selection check box to specify if only whole words that match your selected text are highlighted, as follows.

      • Unchecked (the default value), any other text matching the case‑sensitive selection is also highlighted using the Additional Selections color specified on the Editor sheet of the Preferences dialog (lime green, by default), unless the selection contains space-type characters; for example, selecting the word to highlights any occurrence of to in the editor pane.

      • Checked, any selection causes other text matching text in the editor pane to be highlighted if the selection is a full‑word identifier and there are other occurrences of that word in the editor pane. This match is case‑sensitive and full-word; for example, selecting the word caption highlights any other occurrence of the full word caption.

  6. In the Edge Mode Options group box:

    1. In the Edge Column text box, specify the number of the column at which the long line marker is displayed. Although no long-line marker is displayed by default (that is, the default value is zero), you can specify a value in the range 1 through 200.

    2. Select or specify the edge mode that is used to display long lines in the editor pane, by selecting one of the following values.

      • None (the default value), when no long-line marker is displayed.

      • Background, in which the background color (edge marker) is used to mark long lines.

      • Line, in which a vertical line is drawn at the column number specified in step a.

        Although this mode works well for monospaced fonts, as the line is drawn at a position based on the width of a space character, it may not work very well if you use proportional fonts.