I cannot make IDEA perfectly align parameters passed to some method when I break them into new line by Enter
key.
Here is visually what I need. I have a method like this.
When I break parameters into new row each, it looks like this.
Even trying to align them with Tab
key does not help.
You see how ugly this is, not to say it's not easy to reach such code. And all I want is too look like this:
(Note: this one I set via Space
key).
I must have been doing something wrong as I can bet this can be set in IDEA. But where?
Bring up Settings
panel :
Code Style > Java > Wrapping and Braces (tab)
Enable Align when multiline
option in Method declaration parameters
and Method call arguments
Apart from the way suggested by @Rangi Lin, also make sure that your
Code Style > Java > Keep When Reformating > Line Breaks
in your settings is also checked. Otherwise reformatting your code could realign your method params into a single line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With