WebStorm not tabbing correctly on a single file

56 views Asked by At

For some strange reason, WebStorm has decided that all tabs typed in for a single file shall be single spaces, instead of the 4 the editor is set for.

I have checked, all my other source files are still working correctly.

Things I have tried:

  1. Closing tab and reopening
  2. Renaming the file
  3. Restarting WebStorm
  4. Restarting and clearing WebStorm cache
  5. Rebooting machine
  6. Deleting everything in the file and trying to tab, it still does it

Anyone else ever seen anything like this? It's driving me nuts not to be able to tab!

1

There are 1 answers

0
LazyOne On BEST ANSWER

Few ideas:

  1. You have Detect and use existing file indents for editing option enabled and it's somehow remembers those indents. Try disabling that option at Settings (Preferences on Mac) | Editor | Code Style.

  2. Try re-creating file from scratch (especially if you need option from #1 to be enabled):

    • delete that file completely (from inside IDE);
    • create such file again outside of IDE and type some code there using proper indents;
    • open in IDE -- any better?
  3. Do you have any .editorconfig files in your project (even above the project root)? Maybe that file contains special settings for this file (that's of course if EditorConfig plugin is installed and enabled).