Summary

Summary and shortcuts we used

Summary

In this tutorial we have 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.

NamemacOS ShortcutWindows Shortcut
Search everywhere dialog⇧⇧Shift+Shift
Apply Intention Actions⌥⏎Alt+Enter
Open Preferences/Settings⌘,Ctrl+Alt+S
Open the Commit Window⌘0Alt+0
Open the Project Window⌘1Alt+1
Reformat File⌘⌥LCtrl+Alt+L
Reformat File Options⌘⌥⇧LCtrl+Alt+Shift+L

Related Links