After I applied Atom Beautify on my code using Uncrustify, the trailing comments are aligned as follow:
unsigned int redLEDValue = 0; // redLED
unsigned int blueLEDValue = 0; // blueLED
unsigned int greenLEDValue = 0; // greenLED
unsigned int redSensorValue = 0; // redSensor
unsigned int blueSensorValue = 0; // blueSensor
unsigned int greenSensorValue = 0; // greenSensor
There is only once space between the semicolon and the trailing comment, but I want to have at least 2 spaces between them. I'm using Atom 1.12.9, Atom Beautify 0.29.16, and Uncrustify 0.64. Here is my Uncrustify config.
Is there any way to increase the gap? I've already set align_right_cmt_span = 4
but no hope. Thanks in advance.
You have to enable adding spaces first with the option:
Than you can adjust the amount of spaces with:
Edit:
Uncrustify has also an aligning function for trailing comments which is applied after the spacing functionalities. The aligning function is controlled by those three options:
Note:
align_right_cmt_span
is greater than 0.align_right_cmt_gap
is enabled if it is 0. All numeric options are initially set to 0 as default values.align_right_cmt_at_col
is less than the column of the last char before the beginning of the comment the comment will be indented to one space after the last char.