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.vlogdt/format.whitespace.trim_end_of_line) - When enabled, end of line whitespace is deleted.

Before

After

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

Before

After

../../_images/before-trim-whitespace-lines.png
../../_images/after-trim-whitespace-lines.png
  • Compact whitespace groups (ro.amiq.vlogdt/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.png
../../_images/after-compact-whitespace-group.png
  • Compact consecutive empty lines (ro.amiq.vlogdt/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.vlogdt/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.png
../../_images/after-compact-consecutive-empty-lines.png
  • Add whitespace before (ro.amiq.vlogdt/format.whitespace.add_before) - Space separated list of tokens to add whitespace before.

Before

After (“=” token)

../../_images/before-add-whitespace-before.png
../../_images/after-add-whitespace-before.png
  • Add whitespace after (ro.amiq.vlogdt/format.whitespace.add_after) - Space separated list of tokens to add whitespace after.

Before

After (“=” token)

../../_images/before-add-whitespace-after.png
../../_images/after-add-whitespace-after.png
  • Remove new line before (ro.amiq.vlogdt/format.whitespace.remove_nl_before) - Space separated list of tokens to remove new lines before.

Before

After (“=” token)

../../_images/before-remove-new-line-before.png
../../_images/after-remove-new-line-before.png
  • Remove new line after (ro.amiq.vlogdt/format.whitespace.remove_nl_after) - Space separated list of tokens to remove new lines after.

Before

After (“=” token)

../../_images/before-remove-new-line-after.png
../../_images/after-remove-new-line-after.png