Intellij IDEA Blank Lines after Opening Brace Formatting

三世轮回 提交于 2019-12-12 04:25:26

问题


For some reason I do not remember this as being default but trying to figure out how to make Intellij only insert 1 blank line instead of 2 blank lines after opening brace.

This is what my current default setup is doing:

```
myMethod(arg) {


}
```

But this seems more logical and what I want:

```
myMethod(arg) {

}

```

回答1:


Go to:

EditorCode StyleJavaBlank Lines

Choose how many spaces you want around methods, classes, etc...




回答2:


Disabling Gauge plugin as recommended in this post did the trick: Intellij adding extra line in new blocks.



来源:https://stackoverflow.com/questions/28010094/intellij-idea-blank-lines-after-opening-brace-formatting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!