.. _Vertical Alignment:

Vertical Alignment
==================

.. rst-class:: lead

When enabled, this option performs vertical alignment.

-  **Vertical Alignment Tokens** (ro.amiq.edt/format.vertical_align.tokens)

The lines of code inside the same *scope* are aligned by the specified comma separated list of vertical alignment tokens.
Vertical alignment is performed left to right, by the same token. For example assuming ``=`` and ``:`` as vertical align tokens:
In order to use the comma character ``,`` as a vertical alignment token, the character must be preceded by the escaping character ``\``.

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Before
     - After ("=" token)
   * - .. figure:: ../../images/common/before-vertical-align-tokens-e.png
     - .. figure:: ../../images/common/after-vertical-align-tokens-e.png


-  **Only consecutive lines** (ro.amiq.edt/format.vertical_align.consecutive_lines) - When enabled, only consecutive lines are vertically aligned. Two lines are consecutive if they follow each other or are separated by comment lines.

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Before
     - After
   * - .. figure:: ../../images/common/before-only-consecutive-lines-e.png
     - .. figure:: ../../images/common/after-only-consecutive-lines-e.png


-  **Vertical align single line comments** (ro.amiq.edt/format.vertical_align.sl_comments) - When enabled, single line comments are aligned.

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Before
     - After
   * - .. figure:: ../../images/common/before-vertical-align-single-line-comments-e.png
     - .. figure:: ../../images/common/after-vertical-align-single-line-comments-e.png


