Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example EditorConfig file
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
[*.txt]
indent_style = tab
indent_size = 4
[*.{diff,md}]
trim_trailing_whitespace = false
@rtxrulez

This comment has been minimized.

Copy link

@rtxrulez rtxrulez commented Feb 20, 2018

Thanks you!

@salif

This comment has been minimized.

Copy link

@salif salif commented Feb 23, 2020

What will happen if I set root to false?

@zharedfield

This comment has been minimized.

Copy link

@zharedfield zharedfield commented May 14, 2020

What will happen if I set root to false?

it'll start looking for other .editorconfig files in the inner paths or something i think

@kdav5758

This comment has been minimized.

Copy link

@kdav5758 kdav5758 commented May 7, 2021

What will happen if I set root to false?

From https://editorconfig.org/

"When opening a file, EditorConfig plugins look for a file named .editorconfig in the directory of the opened file and in every parent directory. A search for .editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment