Recently Android Studio started a new behavior when I type an opening bracket { or parenthesis ( and then hit Enter in a Kotlin file.
Instead of creating a single indented new line followed by a brace on a second new line, it creates two indented new lines before a third line with the closing brace. But the second blank line is indented one less than the first one.
So when I type this and then hit Enter:
run {
instead of this, where the | represents where the cursor is:
run {
|
}
I get this, where the second blank line four spaces shorter than the first:
run {
|
}
This has been driving me nuts because I have to manually delete the extra line every time I finish with any multi-line closure. I've searched all over the settings and cannot find how to change this.
It doesn't do it with Java code, and IntelliJ IDEA doesn't do this to me either.
- Android Studio 4.1.1
- IntelliJ IDEA 2020.2.1
from Unwanted extra new line added when starting a new line after an opening bracket
No comments:
Post a Comment