Reputation: 1347
I somehow disabled the auto indent when typing {} I mean
once if I wrote
if (c)
{}
and enter a space between the brackets it would automatically do this
if (c)
{
...
}
how to located this option?
Upvotes: 2
Views: 1873
Reputation: 11577
Under "Preferences": Java > Editor > Save Actions
1) Check "Additional actions"
2) Click "Configure…"
3) Go to the "Code Style" tab
4) Check "Use blocks in if/while/for/do statements" and configure to your preferences
other places that it might be:
Preferences -> Java -> Code Style -> Formatter -> Edit -> Braces. The brace position you want is Next line indented
Upvotes: 1