Can I ignore / exclude file / folder from .editorconfig?

Is it possible to ignore / exclude file / folder from .editorconfig?

Cause. I have a /vendor folder with third-party files. I do not want the folder to inherit any of my .editorconfig configurations.

I found the EditorConfig-Properties page and it seems that there is no property to exclude folders. Maybe there is a hack to make this possible?

current configuration

 root = true [*] end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab 
+5
source share
2 answers

@ iDev247, another solution to ignore the /vendor folder:

  • matches the path you want to ignore.
  • set none to the property you want to ignore.

For example, if you have:

 /index.html /vendor /.editorconfig 

You can map all the files in the vendor directory in .editorconfig and ignore all the properties (to set the default IDE):

 # top-most EditorConfig file root = true # Ignore paths [/vendor/**] charset = none end_of_line = none insert_final_newline = none trim_trailing_whitespace = none indent_style = none indent_size = none 

In fact, you can set any "invalid" value, and the property should be ignored (restored to the IDE / editor by default)

Additional Information:

+5
source

You can create a .editorconfig file in vender/ with a simple root = true .

+4
source

All Articles