Generate .editorconfig

Create an .editorconfig that standardizes indentation, encoding, and line endings.

freeworks offlinenothing uploaded
Tool.editorconfig Generator
Input
Output

How it works

Indentation, charset, line-ending, final-newline, and trimming settings are serialized into sections with glob patterns. Later matching sections override broader settings.

  • UTF-8, LF, and a final newline suit cross-platform source.
  • Indentation remains language-specific.

Worked example

Standard web project config
Generate an .editorconfig with 2-space indentation
Input
											Indent style: space
Indent size: 2
End of line: lf
Charset: utf-8
Trim trailing whitespace: true
Insert final newline: true
Max line length: 120
Include markdown: true
Include makefile: false
										
Output
												# EditorConfig - https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.{json,yml,yaml}]
indent_size = 2

[*.{css,scss,less}]
indent_size = 2
											

When to use this

Repositories, mixed-language projects, and formatter CI generate EditorConfig files.

Edge cases

  • EditorConfig globs have their own matching syntax.
  • A later section overrides an earlier global value.
  • Unsupported properties may be ignored by an editor.

References