Behavior

Top  Previous  Next

The Behavior dialog window controls a wide spectrum of options that greatly affects your productivity in the Text editor.

Tab size

Enter the tab size in character size increments. Pressing the TAB key moves the caret (the place where something is to be inserted in a line) the specified number of characters.

Indentation size

Enter the indentation length in character size increments. Pressing the ENTER key indents the caret the specified number of characters.

Indentation (CTRL + I)

indentation functionality is divided into 2 essential parts:

Indentation of the existing text (Ctrl + I) or formatting after pressing the Enter key.

Cursor positioning on a new line.

There are three modes of indentation available in the Text Editor:

None

Set this to turn off all indentation effects. Existing text is not indented neither automatically nor by the CTRL+I hot key. Cursor is always placed to the first column on a new line.

Automatic

With Indentation set to Automatic ,the Text Editor keeps a running indent. When you press the Enter key, spaces and tabs are inserted to line up the insert point under the start of the previous line. In this mode indentation is set to the same value as on the previous line. For example, if the text on the previous line starts from the column 8, indented existing text will start from the column 8 (or the cursor on a new line will be placed to the column 8). If you try to indent the entire text in the document (CTRL+A, CTRL+I), all lines will start from column 1.

Smart

After a keyword statement, the next line is indented by the tab size set (see above). After certain keywords (break, return etc.) the next line is "non-indented".

Other rules for Smart include

The Preferred column number (found in the Clarion Specific Options section) identifies a column where a keyword will be placed if it is not located already in some code block. In other words, if the keyword should not be indented relative to the parent it will be placed in the preferred column. The default value is column 21.

Statements are indented from the CODE keyword position (default = on). CODE, DATA and INCLUDE (and USING and INLINE in Clarion#) keywords have one indent.

END is indented to the same column as a keyword in the line that opens a code block:

Keywords inside a code block have one indent from a parent keyword. For example, in the pp PROCEDURE:

If a procedure inside a MAP (MODULE) is written without the PROCEDURE keyword, it will be indented:

Any expression that ends with a colon ":" is treated as a label in the CODE section (default = off, where colons are treated as an actual procedure call)

A line is indented after the Enter key is pressed at the end of the line (The default is on).

You can automatically indent several lines of pasted text (The default is off).

Source comments may also be indented (The default is off).

If previous line has line continuation character '|' the next line will have one indent from the previous one.

In the code definition section (prior to the CODE statement) the cursor is placed on column 1 on a new line. In the CODE section, the cursor is indented according to written statements.

Finally, if you are transferring code from another developer, and there are different Tab Size or Convert Tabs to Spaces options or the code is formatted manually, you may see the erratic behavior when using Smart indentation mode. This is due to the line(s) formatted according to your settings but all other lines remaining unchanged. To solve this issue you have several options:

1) Use the same tab size and indentation mode settings as the other developer.

2) Reformat the code before changing it (Ctrl+A, Ctrl+I).

3) Uncheck the Enable entered line formatting option so that the line will not be reformatted after pressing the Enter key.

4) Change indentation mode to None or Automatic.

See the Clarion Specific options dialog to control the options described above.

Convert Tabs to Spaces

When this option is active, all tab characters are auto converted to space characters when the document is opened.

Can move caret behind EOL

Checking this option allows you to move the caret marker beyond the EOL marker.

Automatic template insertion

This feature is not applicable to Clarion 8 at this time.

Auto insert curly braces

This feature is not applicable to Clarion 8 at this time.

Hide mouse cursor while typing

Check this option to hide the mouse cursor while typing. The mouse cursor will reappear when the mouse is subsequently moved.

Cut or Copy entire line when nothing is selected.

Activating (checking) this option will automatically move the entire line to the clipboard during any Cut or Copy action.

Mousewheel direction

This option is used to set the default scrolling direction of the mouse wheel.