COBOL Editor preferences

The editor is customizable from Window > Preferences > Micro Focus > COBOL > Editor. You can change the above features, as well as colors, line numbers, margins and more.

You can associate a file extension with the COBOL editor. See Window > Preferences > General > Editors > File Associations. You can also associate a file extension with the content type of a COBOL file.

Horizontal ruler

Specify whether to display the ruler and its color.

Typing

  • Tab width - specify the number of spaces that the Tab symbol takes.
  • Insert spaces for tabs - when this is checked, pressing Tab inserts spaces.
  • Smart edit mode - smart edit mode controls the behavior of word wrapping and indentation in the different COBOL areas. When this is enabled, the preferences on the Window > Preferences > Micro Focus > COBOL > Editor > Typing page apply.
  • Force capitals - check this to Eclipse to force capital letters for any new code that you type.
  • Force native line endings when pasting with Ctrl + Shift + V - when this is checked and the Ctrl + Shift + V paste method is used in the editor, it produces line endings native to the local operating system.
    Warning: If you are editing UNIX source (from Micro Focus Enterprise Developer UNIX Components) on a Windows machine when this option is selected, this will result in Windows line endings being produced.

Insert/overwrite mode

As well as the typing features above, you can also configure the default typing mode when the editor first opens a file: either insert mode, or overwrite mode. The default is insert mode, so in order to change this ensure you select:

Window > Preferences > Micro Focus > General > Editors > Open Micro Focus editors in overwrite mode.

Note: This option is used for all types of Micro Focus editor: COBOL, PL/I, BMS, etc...

Smart caret

  • Pressing Tab in the sequence area moves caret to area A - with this option enabled, pressing Tab while the cursor is in the sequence are moves the cursor to the start of area A.
  • Pressing home/end moves caret to the beginning/end of the area - changes the way the Home and End keys move the cursor in the COBOL editor. Pressing Home repeatedly first moves the cursor immediately before the first non-white space in the current area, then at the beginning of the area, or to the first non-white space in the preceding area. Pressing End repeatedly first moves the cursor immediately after the last non-white space in the current area, and then at the start of the following area.

Read-only mode

Specify the color that indicates areas of code that are read-only.

Refactoring COBOL code

Specify your preferences for the refactoring functionality:

Rename in editor without dialog
Enable this if you want rename without seeing the Rename dialog box that offers a preview of your changes.

Remove trailing whitespace

  • Remove trailing whitespace after column 80 only
  • Remove all trailing whitespace - remove trailing whitespace in all COBOL areas
  • Remove trailing whitespace on save - using the save command automatically removes trailing whitespace.

Block matching

Enable these preferences if you want the editor to highlight the keywords that form the statement you have selected. An additional tooltip, containing the opening keyword, is also displayed when you hover over the intermediary and end keywords.

Mark paired keywords for navigation (e.g. IF and END-IF) and display hover text on closing keyword
With this option enabled, clicking on the opening or closing keyword of a statement highlights both keywords. A tooltip containing the opening keyword is also displayed when you hover over the closing keyword.
  • Mark intermediary keywords (e.g. ELSE) - clicking on the opening or closing keyword of a statement also marks any intermediary keywords. Also, hovering over the intermediary keyword displays a tooltip containing the opening keyword.