0
votes

I have gone to File, Settings; in there to Editor, Code Style, Java. And in there I have set use tab character and smart tabs.

But in the editor it keeps inserting 4 spaces instead of tabs. How can I get tabs?

enter image description here

2
You need to reformat your code then you will able to get tab instead of space - MK Tan
@MKTan I tried that - still does spaces. - David Thielen
Do you see this behaviour for existing files only or for new files as well? Does disabling EditorConfig and Settings (Preferences on macOS) | Editor | Code Style | Detect and use existing file indents for editing help? - Andrey
@Andrey That was it - thank you! If you make that an answer, I'll select it. - David Thielen

2 Answers

0
votes

In case you are using an .editorconfig file this will override your IDE code style settings. You can disable it by unchecking the tickbox 'Enable EditorConfig support' under Editor > Code Style. Tabs and Indents - Intellij Support

0
votes

Disable the Settings (Preferences on macOS) | Editor | Code Style | Detect and use existing file indents for editing option.