Two things to start with:
- This issue isn't super urgent or big, but it does waste some of my time;
- It may be a problem with IC, or perhaps with IntelliJ's Java support, if you happen to be reusing that behavior somehow. (I think I have seen a similar issue when editing Java in IC.)
As you know, it is bad practice to let lines get too long, which in my book means beyond character position 120. Apex language constructs that frequently threaten to overrun this limit are select lists in SOQL queries and field initializations in SObject constructors.
When I lay these out "vertically" I would hope that the editor would let me indent like this:
whereas it insists on giving me this:
A select list example looks like this:
Here a SEL* on
ffbc__SoftDate__c has given me two unnecessary indentation levels. The SELECT and FROM keywords start one indent too far to the right, and the selected field list is one indent further to the right relative to the SELECT / FROM column than necessary or desirable.
In practice, I spend quite a bit of time fighting for the indentation I want by manually outdenting lines that have been automatically indented too much.
Do you have recommendations on how to work more efficiently with the indents that the editor gives me in these scenarios? Is there some setting I have missed, or is this actually a minor bug? I would be interested in your analysis.