1001Ferramentas
📝Dev

.editorconfig Generator

Generate a .editorconfig file with indent_style, charset, end_of_line and trim_trailing_whitespace. Standardizes editors across teams. Everything in your browser.

One indentation for the whole team

One dev uses tabs, another uses two spaces, a third saves with CRLF, and the pull request shows up with 400 changed lines and zero logic touched. .editorconfig deals with that at the source: everyone's editor starts following the same indent_style, indent_size, end_of_line and charset. Tick the options here and copy the finished file, which already opens with root = true and a [*] section.

A detail almost nobody mentions: VS Code does not read .editorconfig on its own, it needs the EditorConfig for VS Code extension. JetBrains IDEs and Visual Studio support it natively, while Vim and Sublime want a plugin. And root = true means stop looking in parent folders. In a monorepo only the file at the top should carry that line, otherwise a package further down quietly ignores the shared rules.

The output has a single [*] section covering every file. In practice you add exceptions by hand: [*.md] with trim_trailing_whitespace = false, because two trailing spaces are a line break in Markdown, and [Makefile] with indent_style = tab, because make rejects spaces. Skip utf-8-bom unless some Windows tool insists, since a BOM breaks shell scripts. The file is assembled in your browser.

Frequently asked questions

Does .editorconfig replace Prettier?
No. EditorConfig acts while you type and save; Prettier reformats the whole file. Prettier can read indent_style, indent_size and end_of_line from .editorconfig, but where the two disagree the Prettier config wins.
Where do I save the file?
At the repository root, named exactly .editorconfig, leading dot included. It applies to that folder and everything below it.
Will it fix files that already exist?
No. It only affects what you edit from now on, with trimming and the final newline applied on save. For the legacy files, run a formatter once and commit.

Related Tools