Lahey Fortran

Block Reformatting

Block Reformatting is a free-format source code feature that allows the user to quickly reformat the current line, selected blocks of code, or the entire document.

Reformatting is done by optionally highlighting a section of code, then choosing the Edit|Advanced|Reformat Selection menu option. You may select Format Document instead of Format Selection, and the entire document will be reformatted regardless of selection area.

If any portion of a line is highlighted, the feature works on the entire line. If there is no highlighted code, the single line where the cursor resides will be reformatted.

Reformatting only affects indenting in this version of LF Fortran. In a future version, reformatting will be expanded to allow more granular control over indenting and spacing.

Indenting can be configured in Tools|Options|Text Editor|LF Fortran|Tabs.

Example

A section of code before reformatting:


and after: