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.
请先登录再写评论。
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
Hi Saverio,
That is a bug that template project code style settings are not applied to new project.
Workaround:
Denis
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.