How can I use tabs for indentation in IntelliJ IDEA?

Jonas picture Jonas · Dec 16, 2011 · Viewed 100.8k times · Source

How can I use tabs instead of multiple spaces for indentation in IntelliJ IDEA 11.0?

I have "Use tab character" checked under "Code Style" > "General" > "Default Indent Options". And also tried to have "Smart tabs" checked, but it doesn't help.

From the documentation:

If this check box is selected, tab characters are used:

  • On pressing the Tab key
  • For indentation
  • For code reformatting

Otherwise, spaces are used instead of tabs.

Answer

Paweł Obrok picture Paweł Obrok · Dec 16, 2011

File > Settings > Editor > Code Style > Java > Tabs and Indents > Use tab character

Substitute weapon of choice for Java as required.