DVT IDE for VS Code VHDL User Guide
Rev. 22.1.36, 22 November 2022

14.4 Vertical Alignment

When enabled, this option performs vertical alignment.

  • Vertical Alignment Tokens

The lines of code inside the same scope are aligned by the specified list of vertical alignment tokens.

if(a) begin       if(a) begin
 x = 1;            x  = 1;   // aligned by '=' inside the if scope
 xx = 1;           xx = 1;
end else begin    end else begin
 xxx = 1;          xxx  = 1; // aligned by '=' inside the else scope, orthogonal to the if scope above
 xxxx = 1;         xxxx = 1;
end               end

Vertical alignment is performed left to right, by the same token. For example assuming '=' and ':' as vertical align tokens:

var x  : int = 1; // "first level :", "second level ="
var xx : int = 1;

a  = 1; // not aligned to "second level =" above, as this is a "first level ="
aa = 1;

In order to use the comma character ',' as a vertical alignment token, the character must be preceded by the escaping character '\'.

  • Only Consecutive Lines - Controls whether vertical alignment is applied only to consecutive lines.

  • Vertical Align Single Line Comments - Controls whether single line comments are vertically aligned.

  • Vertical Align To Open Parenthesis - Controls whether to vertically align relative to open parenthesis.

  • Vertical Align Patterns

    • Constant Declarations - Controls whether to align constant declarations.

    • Port Declarations - Controls whether to align port declarations.

    • Signal Declarations - Controls whether to align signal declarations.

    • Variable Declarations - Controls whether to align variable declarations.

    • Variable, Signal, Constant Declarations - Controls whether to align variable, signal and constant declarations.