VHDLFormatter icon indicating copy to clipboard operation
VHDLFormatter copied to clipboard

Set line width

Open grigosback opened this issue 4 years ago • 2 comments

Request a new feature

It would be nice to have an option to set the maximum line width and apply the alignments under that directive.

Example Input:

If I set the line width in 79 chars:

signal user_start_write, user_start_read, user_fin_read, user_fin_write, user_read_mismatch, byte_high, command : std_logic;

Example Output:

signal user_start_write, user_start_read, user_fin_read, user_fin_write,
       user_read_mismatch, byte_high, command : std_logic;

Or maybe:

signal user_start_write, user_start_read, user_fin_read,
            user_fin_write, user_read_mismatch, byte_high, command : std_logic;

grigosback avatar Oct 17 '20 19:10 grigosback

Thanks for the suggestion. It's quite hard to implement and will introduce bugs since I don't know all the cases. The one you showed above is one of many possible cases. What long sentences should be wrapped.?

g2384 avatar Oct 18 '20 13:10 g2384

The main cases that come to my mind now are long signal declarations and constant declarations

grigosback avatar Oct 18 '20 17:10 grigosback