how to apply .editorconfig to existing project in intellige

just enable it... ;)

(unfortunately the setting is off by default)

Settings > Editor > Code Style

checkbox Enable EditorConfig support

enter image description here


Make sure to follow the steps in Michal's answer first. If you want to retroactively apply this editorconfig to your existing files, do the following:

  • I recommend committing all your files to git so you you can reset to that commit if things did not go as planned.
  • Make sure you have a .editorconfig you are happy with.
  • In the 1:Project sidepane, right click on the folder you want to apply the .editorconfig to (e.g. the root folder of your project)
  • Choose Reformat Code, which has the default shortcut ctrlaltL.
  • Select "Include subdirectories". None of the other options are required. Then click "Run".

Your files now follow your .editorconfig file configuration.

Right-click dropdown when clicking on a folder, with Reformat Code selected Reformat Code dialog with only "Include subdirectories" checked