The .editorconfig builder generates a valid EditorConfig file so every contributor’s editor uses the same indentation, line endings and whitespace rules — regardless of personal settings. Choose your base style, add file-type overrides, then copy or download a ready-to-commit file.
How it works
EditorConfig files are read top-down. The builder always emits root = true followed by a [*] section that applies to every file: indent_style, indent_size, end_of_line, charset, trim_trailing_whitespace and insert_final_newline. Editors then apply more specific sections on top — so a [*.md] or [Makefile] block overrides the [*] defaults only for matching files. Because later, more specific matches win, you set sane global defaults once and override only where a file type genuinely differs.
File-type overrides
Three common overrides ship as toggles. [Makefile] forces indent_style = tab because GNU Make requires literal tabs in recipes. [*.{yml,yaml}] pins 2-space spaces because YAML disallows tab indentation. [*.md] sets trim_trailing_whitespace = false because trailing spaces in Markdown create hard line breaks that must be preserved.
Tips
Place the file named .editorconfig at the root of your repository with root = true so it is the authoritative config. Most modern editors support EditorConfig natively or via a small extension — install it if your rules seem ignored. Pair .editorconfig (whitespace and encoding) with a formatter like Prettier or dotnet format (full code style) for complete consistency.