IntelliJ IDEA always formats one-line for statement into multi-line

已回答

IntelliJ keeps formatting this:

for (int i = 0; i < 10; i++) {

}

into this:

for (int i = 0;
     i < 10;
     i++) {

}

 

I prefer the first style(one-line statement) than the second. I tried many methods but failed, please help me.

 

HP Instant Ink Phone Number

评论操作 固定链接

Hello,

Please make sure that wrapping option is not enabled for loops under Settings/Preferences | Editor | Code Style | Java | Wrapping and Braces | for() statement:

 

0

请先登录再写评论。