简体   繁体   中英

Enable Code Style in IntelliJ IDEA

I can see the Code Style scheme for Java under Settings - Editor - Code Style - Java. 设置-编辑器-代码样式-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 sro on Gnome Ubuntu

IntelliJ IDEA does not automatically reformat your code. Instead, you should press Ctrl + Alt + L to reformat your code on request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM