Tool guide
About this tool.
- An .editorconfig file tells editors and IDEs how to indent and save the files in a project, so everyone on the team gets the same tabs, line endings and charset no matter which editor they use. Most editors read it natively or through a small plugin.
- The file is a list of sections. Each section starts with a glob such as [*] or [*.py] and sets properties for the files that match. When several sections match, the later one wins, which is why the language sections come after [*]. A line root = true at the top stops editors from looking for more .editorconfig files in parent folders.
- This tool writes only properties from the EditorConfig specification: indent_style, indent_size, end_of_line, charset, trim_trailing_whitespace and insert_final_newline. Any of them can be left unset.
- Add one to a new repository so contributors do not fight over tabs and spaces.
- Pin LF line endings on a team that mixes macOS, Linux and Windows.
- Give Makefiles and Go files tabs while the rest of the project uses spaces.
- Keep trailing whitespace in Markdown, where two spaces at the end of a line mean a line break.
Pick the settings for the [*] section: indent style, indent size, end of line, charset, trim trailing whitespace and insert final newline. Each can be Not set. Leave the indent size blank to leave it out, or enter a whole number from 1 to 16.
Tick root = true to stop editors from searching parent folders. Tick language sections to add Markdown (keep trailing whitespace), Makefile and Go (tabs), Python (4 spaces), YAML (2 spaces) and Windows scripts (CRLF). The sections are always written in the same order.
Copy the text or save it as .editorconfig in the root of your project. The summary counts the sections and properties, not the root line.
If every setting is Not set and no section is ticked, there is nothing to write and the tool reports an error.
- Defaults → root = true and a [*] section with 2 spaces, LF, UTF-8, trimmed whitespace and a final newline.
- Indent size blank → no indent_size line, so the editor uses its own setting.
- Markdown section → [*.md] with trim_trailing_whitespace = false.
- Python section → [*.py] with 4 spaces.
- Windows scripts section → [*.{bat,cmd,ps1}] with end_of_line = crlf.
- Every setting Not set and no sections → an error, because the file would be empty.
- Processing is local; nothing is uploaded.
- Limits: indent size 1-16.
- Only properties from the EditorConfig specification are written; there is no max_line_length.
- The language sections are fixed presets; their values cannot be edited here.