Auto Indent Groovy/Java with Enter is off by one indent in 14.1.0 and 14.1.1
After upgrading to 14.1.0, typing enter in a groovy/java file auto-indents the new line, but it is one indent level (2 spaces) short of the line above. The line above the new line is a simple line or can end in curly bracket.
I disabled the new 'detect indention on line' and that looked like it fixed it, but then I opened another file and the indent problem happened in that new file. I then fiddled with one of the other indent settings and the newly opened file indention worked fine.
Opening a new file then fails again until I edit the settings. It even 'fixes' the problem when I change Live templates or any other settings. Also, Ctrl-Alt-L (indent file) formats it correctly. Just the newline fails to indent correctly.
Any ideas on a work around? I am getting tired of manually indenting (how quick we become hooked on IDE features :). Attached is my codetyle .xml settings. I was hoping 14.1.1 would solve it, but that update still behaves the same.
Thanks.
Attachment(s):
Default (1).xml
请先登录再写评论。
Please submit a bug at http://youtrack.jetbrains.com/issues/IDEA and also attach a sample file to reproduce the problem there.
Does it help if you rename IDE folders and start with all the default settings, clean caches and no plugins? See https://intellij-support.jetbrains.com/entries/23358108 for the folder locations.
I cleaned out the C:\Users\XYZ\.IntelliJIdea14 and restarted. The problem no longer existed. I have been importing my settings since 4.0, so I suspect some junk got into the configuration.
I was able to re-introduce files/folders from the config directory without any serious problems. Even the codestyles folder worked.
I see no urgent need to log a bug. I suspect this only affects users with a long, uninterrupted upgrade path. I don't really expect you to test all possible upgrades from 4.0 to 14.0 :).