Reputation: 4377
I can see the Code Style scheme for Java under Settings - Editor - Code Style - Java.
The apply button is greyed out while the OK button is highlighted. I click on the OK button and get back to my project. But the Code Style doesn't have any effect when I write code. For instance, for(int i=0;i<100;++1)
is not changed to for (int i = 0; i < 100; ++1)
as per the scheme. Is there any other settings or configurations I need to do or is there any other way of keeping the code "neat"?
I'm using IntelliJ IDEA 2016.1 Build #IC-145.258, built on March 17, 2016 JRE: 1.8.0_76-release-b18 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o on Gnome Ubuntu
Upvotes: 0
Views: 824
Reputation: 5146
IntelliJ IDEA does not automatically reformat your code. Instead, you should press Ctrl+Alt+L to reformat your code on request.
Upvotes: 3