Reformatting Code in IntelliJ IDEA
Why and how you can reformat code in your projects
Introduction
When and why you may want to use code formatting
Reformatting a selection of code or class
Use keyboard shortcuts to quickly reformat some code in your project
Reformatting code you've changed
How you can reformat only code you've edited
Reformatting with Alt + Enter
Using intention actions on a selection to change the code style settings
Reformatting Code Settings
What the settings are for reformatting code and where to find them
Reformatting code before you commit it
Ensure your code is always reformatted before you commit it to VCS
Reformatting code in a directory
How to reformat code directory by directory
Working with EditorConfigs
What is a .editorconfig file and how can you use it in IntelliJ IDEA
Example of Reformatting Code
Invoking Reformat Code on a class and viewing the results
Summary
Summary and shortcuts we used