Indentation Setting Stop Working / PhpStorm

I don't know if this is a bug or what, but I can't find any information to help me solve this.  While working on my last three projects using phpstorm, randomly when i create a new php file and start to code, the indentation settings stop working.  They are set at 4 spaces for tabs and in the code styles, but when i hit the tab key or move to a new line, it will only indent one space, and if you hit tab, you get only 2 spaces.  I have changed the settings every which way and the only way I can fix it is to uninstall phpstorm and my settings, reinstall and manual key in my settings again.  If I switch to a file that has the correct indention, it works fine for that file, but not for any new files.  Anyone having this problem?

2 comments
Comment actions Permalink

Hi there,

Please show a screenshot of your "Settings | Editor | Code Style".

Disabling "Detect and use existing file indents for editing" may help here.

Also check if you do not have any .editorconfig files anywhere in the project path (even above the root) -- settings from such files have priority over actual IDE settings (that's if you have EditorConfig plugin installed and enabled, of course)

0
Comment actions Permalink

I will post them when I get home.  I don't have any .editorconfig files, but I think I found the cuplrit.  After 2 hours last night, I reinstalled phpstorm.  This time, however, I copied out my file and code templates for the project so I wouldn't have to redo them.  After reinstalling I copied that php file template and project file includes back into the web80 folder in my appdata folder.  When I then created a new file, it started doing it again (tab now equals 1 space).  So I deleted the code templates and redid them manually and now the problem is solved.

0

Please sign in to leave a comment.