Whitespace

  • Tabs and Spaces - Lines are indented using tabs or spaces depending on the preferences configured in Window > Preferences > General > Editors > Text Editors:
    • If the Insert spaces for tabs (org.eclipse.ui.editors/spacesForTabs) option is enabled, indentation will use space characters, otherwise tabs will be used.

    • The Displayed tab width (org.eclipse.ui.editors/tabWidth) option controls the size of a tab in spaces.

  • Trim end of line whitespace (ro.amiq.edt/format.whitespace.trim_end_of_line) - When enabled, end of line whitespace is deleted.

Before

After

../../_images/before-trim-end-of-line-whites-e.png
../../_images/after-trim-end-of-line-whites-e.png
  • Trim whitespace lines (ro.amiq.edt/format.whitespace.trim_whitespace_line) - When enabled, whitespace line are deleted.

Before

After

../../_images/before-trim-whitespace-lines-e.png
../../_images/after-trim-whitespace-lines-e.png
  • Compact whitespace groups (ro.amiq.edt/format.whitespace.compact) - When enabled, consecutive whitespace characters are trimmed to a single space character. It does not affect indentation, that is the whitespace at the beginning of a line is not affected by this option.

Before

After

../../_images/before-compact-whitespace-group-e.png
../../_images/after-compact-whitespace-group-e.png
  • Compact consecutive empty lines (ro.amiq.edt/format.whitespace.compact_consecutive_empty_lines) - When enabled, consecutive empty lines are compacted into groups of lines whose number is less than or equal to a specified value. It does not affect the empty lines inside multi-line comments.
    • Maximum number of consecutive empty lines (ro.amiq.edt/format.whitespace.maximum_nof_consecutive_empty_lines) - Consecutive empty lines are compacted when their number exceeds this value.

Before

After (Preference is set to “1”)

../../_images/before-compact-consecutive-empty-lines-e.png
../../_images/after-compact-consecutive-empty-lines-e.png