IntelliJ IDEA – Code reformat and rearrange shortcut keys


In IntelliJ IDEA, we can use Ctrl + Alt + L to reformat and rearrange code in Windows and Linux machine and for Mac OS, use command + option + L.

P.S. Tested with IntelliJ IDEA 2019.3.3 (Community Edition) on Windows machine.

1. Unstructured code in IntelliJ IDEA.

IntelliJ IDEA – Code reformat and rearrange shortcut keys

2. Formatted code in after pressing Ctrl + Alt + L keys.

IntelliJ IDEA – Code reformat and rearrange shortcut keys

References

  1. IntelliJ IDEA – public static void main shortcut
  2. IntelliJ IDEA – System.out.println shortcut
  3. Reformat and rearrange code

Similar Posts

About the Author

Atul Rai
I love sharing my experiments and ideas with everyone by writing articles on the latest technological trends. Read all published posts by Atul Rai.