IntelliJ auto reformat code on run

259 views Asked by At

I would like to execute the "reformat code" action on the entire project automatically when I press the run button. Is there any way to do this?

1

There are 1 answers

2
Sam On BEST ANSWER

I see two possibilities:

  1. Configure action Run and Reformat code to the same keyboard shortcut

  2. Use reformat on save.

P.S. In any project there must be a VCS. Working with it inside IDEA is really good and you should learn how to use it. There is a native reformat on commit checkbox in the commit dialog.