Search code examples
webstorm

This file is indented with 4 spaces instead of 2


I have a download project, but its indented is 4 spaces, My WebStorm settings is 2 spaces, so there will be a this warning.

This file is indented with 4 spaces instead of 2

enter image description here

Is there a way to format all the files in WebStorm?


EDIT-1

As all we know we can use option + command + L to format current file, but how can we format all the files in project?


Solution

  • Perhaps using the "reformat code" feature. I use this all the time on my Mac (Command-Option-L). It seems you can do this for an entire directory:

    https://www.jetbrains.com/help/webstorm/reformatting-source-code.html#refromat