Reformatting Code in IntelliJ IDEA.
Why and how you can reformat code in your projects
![Introduction](/guide/assets/thumbnail-7d9b525c.png)
Introduction
When and why you may want to use code formatting.
![Reformatting a selection of code or class](/guide/assets/thumbnail-9d577599.png)
Reformatting a selection of code or class
Use keyboard shortcuts to quickly reformat some code in your project.
![Reformatting code you've changed](/guide/assets/thumbnail-2e51aad0.png)
Reformatting code you've changed
How you can reformat only code you've edited.
![Reformatting with Alt + Enter](/guide/assets/thumbnail-9631db00.png)
Reformatting with Alt + Enter
Using intention actions on a selection to change the code style settings.
![Reformatting Code Settings](/guide/assets/thumbnail-7e7a0faf.png)
Reformatting Code Settings
What the settings are for reformatting code and where to find them.
![Reformatting code before you commit it](/guide/assets/thumbnail-2e51aad0.png)
Reformatting code before you commit it
Ensure your code is always reformatted before you commit it to VCS.
![Reformatting code in a directory](/guide/assets/thumbnail-2e51aad0.png)
Reformatting code in a directory
How to reformat code directory by directory.
![Working with EditorConfigs](/guide/assets/thumbnail-c42af55f.png)
Working with EditorConfigs
What is a .editorconfig file and how can you use it in IntelliJ IDEA.
![Example of Reformatting Code](/guide/assets/thumbnail-49688e97.png)
Example of Reformatting Code
Invoking Reformat Code on a class and viewing the results.
![Summary](/guide/assets/thumbnail-5e269aec.png)
Summary
Summary and shortcuts we used.