Tabs and Indents Settings not copied to new projects?

I've just started using IntelliJ IDEA 12 Community Edition. Either I'm missing something obvious, or the default settings for Tabs and Indents are not being copied over for new projects. I went into File -> Other Settings -> Default Settings. The left-hand navigation shows "Template Project Settings". I selected the "Code Style" tree item. I made sure that the "Project" scheme was selected in the right-hand window content. Then, for each "Code Style" tree item ("General", "Groovy", "HTML", "Java", and "XML") I checked the "Use tab character" option and the "Smart tabs" option. I clicked "Apply", then "OK". When I create a new project, however, those settings are not used. Everything within "Code Style" section has the "Use tab character" option unchecked.

Can someone confirm this behavior, or tell me what I'm doing wrong?

And please, don't turn this into "You should be using spaces instead of tabs" debate.

3 comments

Being honest, even after using IDEA now for more than 12 (?) years, I don't
fully understand how the source code settings are exactly handled by IDEA,
what files to put under version control to get a consistent layout for each
new working copy.

Tom

0

Hi Saverio,

That is a bug that template project code style settings are not applied to new project.

Workaround:

  1. Create new named code style scheme;
  2. Configure it as necessary and select at template code style settings;
  3. Result: that code style scheme is used when you create new project;

Denis

0

Ah, thank you for indicating this is a bug. I thought I was going crazy. I actually did search the bug list, but I was unable to find this listed in there.

Your workaround works.

0

Please sign in to leave a comment.