Set the formatter preferences

Use formatter preferences to set how you want your code to be formatted.

About this task

Note: Column-limited free-form source can be formatted between columns 8 and 80. Fully free-form source can be formatted between column 1 and whatever you set as an end column.

Procedure

  1. Access the formatter preferences page. Click Window > Preferences to access the main preferences page. Select Remote Systems > Remote Systems LPEX Editor > IBM i Parsers > ILE RPG > Formatter to access the formatter preferences.
  2. Set the preferences.
    Start column
    Indentation begins at the Start column that you set.
    End column
    The end of a line will not go beyond the End column that you set.
    Number of spaces to indent by
    Specify the number of blanks that are added to each nested level of indentation.
    Indent WHEN/OTHER within SELECT statement
    Specify the number of blanks to indent WHEN/OTHER statements within a SELECT statement.
    Preserve the relative indentation of continued lines
    For lines following the initial line in a multiline statement, any manual alignment that you have done relative to the initial line will be preserved. For example, in the following statement, for readability the b and c variables are aligned in the same column:
    if a < 2 AND
       ( b > 3 OR 
         c < 1 );
    If the Preserve the relative indentation of continued lines option is selected, these variables will remain aligned and their relative positions will not be affected by formatting.
    If this option is not selected, lines following the initial line will be indented by the value set in Number of spaces to indent by and relative alignment will no longer be preserved. For example, the following statement shows code formatted without the option. The second and third lines are each indented by two spaces, but the b and c variables are no longer aligned.
    if a < 2 AND
      ( b > 3 OR 
      c < 1 );

Feedback