Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

.editorconfig Generator — Consistent Indentation for Every Editor

Make every editor on your team use the same indentation, line endings and charset. Pick a preset, adjust the defaults and per-file sections (Markdown, Python, Go, Makefile…) and download your .editorconfig.

Mis à jour le
.editorconfig

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : .editorconfig Generator

  1. Choose a preset close to your project — Web, Node, Python, Go or a Makefile project.
  2. Adjust the defaults in the [*] section: indent style and size, line endings, charset, whitespace rules.
  3. Add or edit sections for specific files using globs like *.md, *.{json,yml} or Makefile.
  4. Download the file into your repository root. VS Code needs the EditorConfig extension; JetBrains IDEs support it out of the box.

EditorConfig properties

PropertyValuesEffect
indent_stylespace, tabSpaces or tabs for indentation
indent_size2, 4, tabWidth of one indentation level
end_of_linelf, crlf, crLine endings — use lf in most repos
charsetutf-8, utf-8-bom, latin1…File encoding
trim_trailing_whitespacetrue, falseRemove spaces at line ends on save
insert_final_newlinetrue, falseEnsure files end with a newline
max_line_lengthnumber, offGuide/hard wrap in supporting editors

Why Markdown and Makefiles get their own sections

In Markdown two trailing spaces create a line break, so trim_trailing_whitespace = false for *.md. Makefiles require real tab characters for recipe lines, and Go’s gofmt uses tabs too. Python’s PEP 8 recommends 4 spaces.

EditorConfig vs Prettier

EditorConfig controls how your editor writes files as you type; formatters like Prettier rewrite them on save or in CI. They work together — Prettier even reads .editorconfig for indentation and line endings. Add the file next to your .gitignore and package.json, and format existing code with the JavaScript, CSS or HTML Formatter.

Aussi recherché comme : .editorconfig, editorconfig example, indent style tabs spaces, end of line lf crlf, trim trailing whitespace, insert final newline, editorconfig vscode.

Outils complémentaires : .editorconfig Generator

  • Générateur de workflows GitHub Actions — Choisissez votre pile, vos déclencheurs et vos étapes, puis obtenez un script commenté .github/workflows/ci.yml — installation, mise en cache, analyse syntaxique, test, compilation, une matrice de versions et, en option, un déploiement vers GitHub Pages, Vercel ou un registre de conteneurs.
  • YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.
  • Kubernetes YAML Generator — Fill in your app’s name, image and port and get production-ready Kubernetes YAML: a Deployment with probes, resource limits and a hardened security context, plus the Service, Ingress with TLS, ConfigMap, Secret and HorizontalPodAutoscaler you tick — in one file ready for kubectl apply.
  • systemd Service Generator — Run your app as a proper Linux service that starts on boot and restarts when it crashes.

Questions fréquentes

Where do I put .editorconfig?
In the root of your repository. Editors look for .editorconfig files from the opened file’s folder upwards and stop at a file with root = true.
Does VS Code support EditorConfig?
Yes, with the official “EditorConfig for VS Code” extension. JetBrains IDEs, Visual Studio, Vim (9+/Neovim), Sublime (plugin) and many others support it too.
Tabs or spaces?
Follow your language’s convention: 2 spaces for JavaScript, CSS, HTML, JSON and YAML; 4 spaces for Python, Java and C#; tabs for Go and Makefiles. Consistency inside one repository matters most.
Should I use LF or CRLF?
LF for almost every repository, including those developed on Windows — Git and modern editors handle it. Keep CRLF only for Windows-specific files like .bat or .cmd.
Puis-je installer .editorconfig Generator en tant qu’application web et l’utiliser hors ligne ?
Oui. .editorconfig Generator est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires