Write an .editorconfig without the guesswork
Pick indent style, size, line endings, and charset; get a valid .editorconfig file with the common sections filled in.
Tools used in this guide
The job
EditorConfig keeps mixed editors honest about indentation and line endings. The file format is simple but the property names are easy to mistype; the generator emits a correct skeleton you can extend.
Choose the conventions
Set indent style (spaces or tabs), indent size, end-of-line, charset, whether to trim trailing whitespace and insert a final newline. Generate the file, then download or copy the result.
- root = true stops the search for parent configs — put it at the repo root.
- The exceptions toggle adds the two common overrides: a [*.md] section that disables trailing-space trimming and a Makefile section that forces tab indentation.
Worked example
Spaces, 4, LF, UTF-8, trim whitespace, final newline produces a six-line [*] block; with exceptions on, a [*.md] override and a [{Makefile,makefile}] override follow.
Where it stops
It generates a reasonable starting file — it does not detect your repo's existing style or merge with an existing .editorconfig. Only the standard core properties are emitted; plugin-specific keys are not included.