No Login Data Private Local Save

.editorconfig Generator - Online Uniform Code Styles

9
0
0
0

.editorconfig Generator

Generate uniform code style configurations for your project. Compatible with all major editors & IDEs.

EditorConfig Core 0.12.1
⚡ Quick Presets
Web Dev JS/TS, CSS, HTML, JSON
Python PEP8 4-space, Makefile tabs
Minimal Global [*] only
Root Config Declare this as the top-most config
[*] Global · All Files
Add File Type Rules
.editorconfig

About EditorConfig & Frequently Asked Questions

EditorConfig is an open standard that helps developers define and maintain consistent coding styles across different editors and IDEs. It uses a simple .editorconfig file placed in your project root, which editors read to automatically apply settings like indentation style, line endings, charset, and more. It's supported by over 30+ editors including VS Code, IntelliJ, Sublime Text, and Vim.

Place the .editorconfig file in the root directory of your project. Editors will automatically search for it by traversing up the directory tree from the file being edited. If you set root = true, the search stops at that file, preventing conflicts with parent directory configurations.

Setting root = true tells editors that this .editorconfig file is the top-most configuration. Editors will stop searching for parent .editorconfig files in upper directories. This is useful for monorepos or when you want to ensure your project's settings aren't overridden by a global config in your home directory.

Patterns use glob-style matching similar to .gitignore. The pattern [*] matches all files, [*.js] matches all JavaScript files, and [*.{js,ts}] matches both .js and .ts files. Rules are applied in order from top to bottom, with later matching rules overriding earlier ones for the same file.

EditorConfig is natively supported in many editors like WebStorm, IntelliJ IDEA, PyCharm, GitHub Codespaces, and GitLab. Others like VS Code, Sublime Text, Vim, Emacs, Atom, and Notepad++ require a plugin. Visit editorconfig.org for the complete list and plugin downloads.

Yes! This is one of EditorConfig's most powerful features. You can define a global [*] section for defaults, then add specific sections like [*.py] for Python (4-space indentation per PEP8), [Makefile] for tab-indented Makefiles, or [*.md] for Markdown files with different whitespace rules. Use our generator above to easily manage multiple file type rules.

indent_size defines how many spaces are used for indentation when indent_style = space. tab_width controls how wide a tab character appears visually in the editor (usually relevant when indent_style = tab). If you use spaces for indentation, you mainly need indent_size; if you use tabs, set tab_width to define the visual width.

Not at all! You can add an .editorconfig file to any existing project. It helps standardize code style for all contributors going forward. For legacy codebases, consider applying settings gradually or using trim_trailing_whitespace = false initially to avoid massive diff changes, then enable it later after cleanup.

Supported Properties Reference

indent_stylespace | tab
indent_sizepositive integer
tab_widthpositive integer
end_of_linelf | crlf | cr
charsetutf-8 | utf-8-bom | utf-16be | utf-16le | latin1
trim_trailing_whitespacetrue | false
insert_final_newlinetrue | false
max_line_lengthpositive integer
roottrue | false (top of file only)