Alberto
Alberto

Reputation: 12949

IntelliJ indentation avoid using 2 tabs

Something IntelliJ is using 2 tabs to indent code, but I really hate it, but I can't find where I can set this param in the settings.
An example of those cases are the following:

public static void main(String[] args) {
    new Thread(
            () -> {} // as you can see this line of code is indented by 2 tabs
    );
}

Does anyone knows how to change this behavior?

Upvotes: 5

Views: 515

Answers (2)

vs97
vs97

Reputation: 5859

To access the settings, in the Settings/Preferences dialog (Ctrl+Alt+s), go to Editor | Code Style and choose language. You can set the settings you want there.

enter image description here

Upvotes: 5

Daniel
Daniel

Reputation: 1490

You can change the Tab size and Indent in

Preferences -> Editor -> Code Style -> [Language]

IntelliJ Edit Code Style

Upvotes: 3

Related Questions