Summary

Summary and shortcuts we used.

Summary

In this tutorial, we looked at how to apply the code style settings in a number of different scenarios including on a per-class basis and before-commit, as well as only reformatting code that you've changed. We've also looked at how to integrate EditorConfig files into your project and pulled it all together with an example.

You can also take a look at our IntelliJ IDEA Blog and embedded video on Code Formatting.

Shortcuts Used

Here are some of the shortcuts that we used and some additional ones that you can try out.

Name macOS Shortcut Windows Shortcut
Search everywhere dialog ⇧⇧ Shift+Shift
Apply Intention Actions ⌥⏎ Alt+Enter
Open Preferences/Settings ⌘, Ctrl+Alt+S
Open the Commit Window ⌘0 Alt+0
Reformat File ⌘⌥L Ctrl+Alt+L
Reformat File Options ⌘⌥⇧L Ctrl+Alt+Shift+L

Related Links