.editorconfig Generator
Memandu
.editorconfig Generator
Build a valid, spec-compliant .editorconfig file for your project without memorising property names or cross-checking values. Pick a preset for your language, tweak the global defaults, toggle a few per-language overrides, and copy the result straight into the root of your repository.
EditorConfig files keep indent styles, line endings, character sets, and trailing-whitespace rules consistent across every editor and IDE your team uses. A misspelled property name or a value outside the allowed set is silently ignored, so a generator that only emits supported keys is the safest way to avoid quiet drift between developers.
Cara Penggunaan
- Pilih sebuah Preset Cepat that matches your primary language (JavaScript/TypeScript, Python, Go, PHP, Ruby, Web, or Mixed). The preset pre-fills every global default below.
- Adjust the Global Defaults — indent style, indent size, tab width, end-of-line, charset, max line length, trim trailing whitespace, and insert final newline.
- Tick any Language Overrides you need. Each toggle appends a properly-scoped section such as
[*.py]atau[{Makefile,makefile,GNUmakefile}]with sensible per-language rules. - Copy the generated file or download it as
.editorconfigand drop it into the root of your repository. EditorConfig plugins in VS Code, JetBrains IDEs, Vim, Sublime, and most other editors pick it up automatically.
Fitur
- Language presets – JavaScript/TypeScript, Python, Go, PHP, Ruby, Web (HTML/CSS/JS), and a Mixed profile that covers typical polyglot repositories.
- Every standard global property –
indent_style,indent_size,tab_width,end_of_line,charset,trim_trailing_whitespace,insert_final_newline, dan opsionalmax_line_length. - Scoped overrides – one-click toggles for Markdown, YAML, JSON, JS/TS, CSS, HTML/XML, Python, Go, PHP, Ruby, Makefile (tab indent enforced), and
.bat/.cmd(CRLF enforced). - Pratinjau langsung – the file updates on every change, with copy-to-clipboard and one-click download buttons.
- Hanya sisi klien – the form state never leaves your browser; nothing is uploaded, logged, or stored server-side.
- Always valid – each emitted property is restricted to the values accepted by the EditorConfig specification, so your file will not be quietly ignored.
Why EditorConfig?
Without a shared configuration, a single repository can end up with tabs in one file, four spaces in another, and CRLF line endings sneaking in from a Windows contributor. EditorConfig solves that by letting one file at the project root express the formatting contract every editor must follow, before any linter or formatter even runs.
Tanya Jawab Umum
-
Where should I place the .editorconfig file?
Put it in the root of your repository. EditorConfig-aware editors walk upward from the file being edited and merge settings from every .editorconfig they encounter along the way, so a root-level file is sufficient for most projects. Nested .editorconfig files can override settings in specific sub-directories when you need per-folder rules.
-
What does root = true do?
The root = true directive at the top of a file tells EditorConfig plugins to stop searching for additional .editorconfig files in parent directories. Without it, a plugin may continue looking upward and merge in settings from a home-directory or parent-project file you did not intend to inherit.
-
Is indent_size the same thing as tab_width?
They are related but distinct. indent_size is how many columns an indent level represents, measured in the chosen indent_style. tab_width is the visual width of a literal tab character. When they differ, EditorConfig supports styles like indent_style = space with indent_size = 4 while still displaying tab characters as 8 columns via tab_width.
-
Why does Makefile have to use tabs?
GNU make requires recipe lines to begin with a literal tab character. Converting those tabs to spaces causes make to fail with a missing separator error. That is why the Makefile override sets indent_style = tab and omits indent_size — nothing else is a valid build file.
-
What happens if my editor does not support EditorConfig natively?
Most modern editors and IDEs have first-party support (JetBrains, Visual Studio, GitHub web) or a first-party plugin (VS Code, Sublime Text, Vim, Emacs). Editors without a plugin simply ignore the file, and a misspelled or unsupported property is silently skipped — malformed rules never cause a build or editor error.
Instal Ekstensi Kami
Tambahkan alat IO ke browser favorit Anda untuk akses instan dan pencarian lebih cepat
恵 Papan Skor Telah Tiba!
Papan Skor adalah cara yang menyenangkan untuk melacak permainan Anda, semua data disimpan di browser Anda. Lebih banyak fitur akan segera hadir!
Alat Wajib Coba
Lihat semua Pendatang baru
Lihat semuaMemperbarui: Kita alat terbaru ditambahkan pada 29 Apr 2026
