Skip to content

Instantly share code, notes, and snippets.

@JamesMGreene
Created November 16, 2015 12:04
Show Gist options
  • Save JamesMGreene/f4b01ff4a2f8e6faead1 to your computer and use it in GitHub Desktop.
Save JamesMGreene/f4b01ff4a2f8e6faead1 to your computer and use it in GitHub Desktop.
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
@koderhun
Copy link

Thanks you!

@zharedfield
Copy link

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

@pocco81
Copy link

pocco81 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