A IntelliJ plugin to provide better vertical alignment.
Align your code by assignment(=
, +=
, -=
, *=
, /=
), colon(:
) and comma(,
). also support trailing comment.
You don't have to select what to be aligned, this plugin automatically figure it out.
IntelliJ IDEA, Android Studio. (and maybe other JetBrains families.)
Place your cursor at where you want your code to be aligned, and invoke the Align command via Code
-> Smart Align
or Press Alt + Shift + -
.
Then the code will be automatically aligned.
Detects and aligns lines that use the same symbol group from the line around the cursor.
Because Reformat Code
and Smart Align
conflicts, I recommend enabling formatter markers in comments via Settings
-> Editor
-> Code Style
-> Fromatter Control
-> Enable formatter markers in comments
// @formatter:off
write code here to be aligned.
// @formatter:on
gradle test
gradle runIde
gradle buildPlugin
Intellij-smart-align is heavily inspired by Better Align for Visual Studio Code