.editorconfig Generator
Build an .editorconfig file for indentation, line endings, encoding and whitespace so every editor on a team formats files the same way.
How to make an .editorconfig
Choose the indentation
Spaces or tabs, and the indent size.
Choose line endings and encoding
LF, CRLF or CR, and UTF-8, UTF-8 with BOM or Latin 1.
Set the whitespace rules
Maximum line length, trim trailing whitespace, final new line, and Markdown or Makefile exceptions.
Save it
Copy it, or download it as .editorconfig for the root of your project.
Worked example
This is what .editorconfig Generator gives for its own sample values. Open the tool above and change anything to try your own.
- Indent with
- Spaces
- Indent size
- 2
- Line endings
- LF (Linux, macOS)
- Encoding
- UTF-8
- Maximum line length (0 for none)
- 0
- Trim trailing whitespace
- Yes
.editorconfig
root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false [Makefile] ...
About .editorconfig Generator
Build an .editorconfig so that every editor on your team uses the same indentation, line endings, encoding and whitespace rules. It is read by VS Code, JetBrains IDEs, Vim, Sublime and many others.
FAQs
Do editors need a plugin?
JetBrains IDEs support it by default. VS Code and some others need the EditorConfig extension.
Why keep trailing spaces in Markdown?
Two spaces at the end of a line make a line break, so removing them changes the text.
Where does it go?
In the root folder of your project.