Search code examples
intellij-ideacode-formatting

Intellij adding extra line in new blocks


When I'm writing code in Intellij, I often create new blocks by typing these types of sequences:

if (test) {

Typing that open curly brace causes Intellij to automatically insert a closing brace and move the cursor between the two braces:

if (test) {|}

At this point, I simply press Enter and get a nicely formatted block with the cursor right where it should be:

if (test) {
    |
}

However, today Intellij is adding an extra line to the block, like this:

if (test) {
    |

}

I've looked all over the project and IDE settings, but I'm not sure what to change. FYI, it's happening in various file types (.java, .js, .css) across different types of projects (Spring/Java, Node/Express). Anyone know how to fix this little annoyance?


Solution

  • As of 5MAR2015 the solution is to disable the Gauge plugin. Credit for this goes to @KaPaHgaIII