Esta página ainda não foi traduzida para o português, por isso aparece em inglês.

.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.

Atualizado em
.editorconfig

Seus dados nunca saem do seu computador. Todo o processamento acontece localmente no navegador.

Como usar: .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.

Também pesquisado como: .editorconfig, editorconfig example, indent style tabs spaces, end of line lf crlf, trim trailing whitespace, insert final newline, editorconfig vscode.

Ferramentas que combinam com: .editorconfig Generator

  • Gerador de fluxos de trabalho do GitHub Actions — Escolha sua pilha, gatilhos e etapas e receba um arquivo .github/workflows/ci.yml — instalação, cache, verificação de código, teste, compilação, uma matriz de versões e, opcionalmente, implantação no GitHub Pages, Vercel ou em um registro de contêineres.
  • 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.

Perguntas frequentes

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.
Posso instalar o .editorconfig Generator como um aplicativo da web e usá-lo offline?
Sim. O .editorconfig Generator é um aplicativo da web instalável (PWA) — instalado a partir do seu navegador, não baixado de uma loja de aplicativos. Clique em “Instalar aplicativo” na parte superior desta página no Chrome ou no Edge (Windows, macOS, Linux, ChromeOS) ou, no Android, use “Compartilhar” → “Adicionar à tela inicial” no iPhone e no iPad, ou “Arquivo” → “Adicionar ao Dock” no Safari 17+ em um Mac. Em seguida, ela se abre em uma janela própria com seu próprio ícone e, como é executada inteiramente no seu navegador, continua funcionando offline. O Firefox no desktop não permite a instalação de aplicativos da web. Como funciona a instalação.

Ferramentas relacionadas