Hacker News new | ask | show | jobs
by wmfiv 2243 days ago
A potential next step if it fits your workflow is to create a macro triggered by save. I have one that optimizes imports, reformats code and do silent code cleanup.
2 comments

There is already an intellij plugin called Save Actions which does this (import, reformats, and some extra stuff, like adding final to variables wherever possible(optional off course).
Oh that's nice! Thank you.
IntelliJ IDEA's commit dialog already offers checkboxes to "optimize imports" and "reformat code" ("run gofmt" in case of Go), among others.