EditorConfig is a small, portable standard for sharing a few basic code-style settings across the many editors and IDEs a team might use. As the project describes it, EditorConfig “helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.” It has two parts: a file format, the .editorconfig file that lives in a project’s source tree, and a collection of plugins or built-in support that teach each editor to read those files and apply the settings.
The file format is intentionally minimal. According to editorconfig.org, .editorconfig files use “an INI format that is compatible with the format used by the Python configparser library,” with section headers that are filepath glob patterns. A section such as [.py] applies its settings to all Python files, while [] applies to everything. This means one file can carry different rules for different file types, all in plain text that is easy to read and to version-control alongside the code.
The properties EditorConfig standardizes are the low-level layout settings that nearly every editor exposes but configures differently: indent_style (tab or space), indent_size and tab_width, end_of_line (lf, cr, or crlf), charset (such as utf-8), trim_trailing_whitespace, and insert_final_newline. Resolution works by walking upward from the edited file: plugins “look for a file named .editorconfig in the directory of the opened file and in every parent directory,” merging what they find, until they reach a file marked root = true, which stops the search. That hierarchy lets a repository set defaults at the top and override them in subdirectories.
A formal specification, hosted at spec.editorconfig.org, pins down exactly how the format is parsed and how properties are resolved, and core libraries implementing it exist for many languages, including C, Python, JavaScript, Java, and Go. That shared spec and the common libraries are what make EditorConfig genuinely cross-editor: a plugin author for any editor can rely on the same parsing and precedence rules, so the same .editorconfig file behaves identically whether a developer opens the project in Visual Studio Code, Vim, JetBrains IDEs, or another tool.
EditorConfig deliberately occupies a narrow niche. It does not reformat existing code the way Prettier or gofmt do, and it does not check for bugs the way a linter does; it simply tells each editor how to behave while you type, so that indentation and whitespace are consistent from the start. In practice it is often used alongside a formatter and a linter, handling the editor-level basics while the heavier tools enforce full style and correctness, and its broad editor support has made the .editorconfig file a common sight at the root of open-source repositories.