Can not change indent for file
Answered
I can not figure out how to change indent of some files. Some files in my project have "4 spaces", even though I made settings to use "Tab". Can not find out how to change it.
Please sign in to leave a comment.
You can change the indents for the opened file using a selector in a bottom menu:
Indents are also configured on a per-language basis at File | Settings (Preferences on macOS) | Editor | Code Style.
There are also some known issues were indentation acts incorrectly, e.g. in mixed html+php contents and in some template engine files (twig,blade).
The case was that it was a php file with HTML in it... and HTML was not set to spaces. Thanks!
This issue was driving me nuts, and this was the cause!
I was working on php files that insisted on being 4 spaces even though I had all the configuration to use tabs and not auto-detect.
You need to configure BOTH php and html to use tabs.