Configuring Typing Preferences (Smart Edit Mode)

Smart edit mode controls the behavior of word wrapping and indentation in the different COBOL areas. With it enabled in Window > Preferences > Micro Focus > COBOL > Editor, you can change the following configuration options in the Typing preferences dialog box: select Window > Preferences > Micro Focus > COBOL > Editor > Typing.

Wrapping
  • Wrap code when area B end is reached - lines wrap when you reach the end of area A/B.
  • Wrapping moves the text in the right hand area to the new line - any comments in the right-hand area stay in the right-hand area but move to the next line when wrapping in the A/B area occurs.
  • Wrap lines when deleting forwards and backwards - when you press Delete after the last non-white space in the area, the line beneath moves up (and where possible wraps in the A/B area), and comments in the right-hand area stay with the associated line of code. Similarly, when you press Backspace in column 1, the current line moves up (and where possible wraps in the A/B area), and comments in the right-hand area stay with the associated line of code.
Indentation
  • Enter key and smart wrapping adjust the indentation on the new line - automatic indentation options.

    Use Smart Indent for enhanced indentation - specify whether to use smart indentation around creating new lines.

  • Tab/Shift-Tab keys adjust the indentation based on the area margins - moving the text using the Tab key is governed by the options for wrapping and indentation around the margins.
Comments
Continue comments on to new line
With this option enabled, pressing Enter inside or at the end of a comment inserts a new line and adds the comment symbol.
Brace completion
Automatic insertion of end-if
With this option enabled, pressing Enter at the end of the first line of the IF statement inserts the closing END-IF clause.
Automatic insertion of end-evaluate
With this option enabled, pressing Enter at the end of the first line of the EVALUATE statement inserts the closing END-EVALUATE clause.
Automatic insertion of end-perform
With this option enabled, pressing Enter at the end of the first line of the PERFORM statement inserts the closing END-PERFORM clause.
Automatic insertion of end-exec
With this option enabled, pressing Enter at the end of the first line of the EXEC statement inserts the closing END-EXEC clause.
Automatic insertion of end-try
With this option enabled, pressing Enter at the end of the first line of the TRY statement inserts the closing END-TRY clause.
Sequence area
Insertion in sequence area preserves area A/B
Entering symbols in the sequence area does not move the code in area A/B.
Delete/backspace in sequence area preserves area A/B
Deleting symbols in the sequence area does not move the code in area A/B.
New line in sequence area preserves area A/B
Pressing Enter while the cursor is in the sequence area adds a new line but does not move the code in area A/B.
Automatically add closing symbol
"Double-quoted strings" and 'single-quoted strings'
With this option enabled, typing the opening single or double quote mark automatically inserts the closing quote. The cursor is positioned between the two quote marks.
  • Smart overtyping and deletion of string delimiters - with this option enabled:
    • Entering a single or double quote when the cursor is inside single or double quoted strings, respectively, positions the cursor immediately after the closing quote. This only works if the cursor is right next to the closing quote - that is at the end of the text content of the string.
    • Pressing Delete or Backspace when the cursor is positioned between the opening and closing quotes deletes both quote marks. This only works if there is no text inside the quotes (that is there is either "" or '').
(Parentheses) and [square] brackets
Check this for the editor to automatically insert a closing parentheses or bracket when you enter the opening one.
  • Smart overtyping and deletion of brackets - with this option enabled:
    • Entering the closing bracket again when the cursor is inside brackets, positions the cursor immediately after the closing bracket. This only works if the cursor is right next to the closing quote - that is at the end of the text content of the string.
    • Pressing Backspace when the cursor is positioned between the opening and closing brackets deletes both brackets. This only works if there is no text inside the brackets (that is there is either () or []).
    • Pressing Delete when the cursor is positioned just before the opening bracket deletes both brackets. This only works if there is no text inside the brackets (that is there is either () or []).