editorconfig-vscode

editorconfigMIT更新放缓

在 VS Code 里自动读取并应用 .editorconfig 配置,统一不同编辑器和团队成员间的缩进、换行、编码等代码风格。

EditorConfig extension for Visual Studio Code

v0.18.2发布于 2026-04-08 13:15 UTC1,375star142fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
在 VS Code 扩展市场安装 editorconfig.editorconfig
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

VS Code 的 EditorConfig 扩展,用 .editorconfig 文件统一项目编码风格

在 VS Code 里自动读取并应用 .editorconfig 配置,统一不同编辑器和团队成员间的缩进、换行、编码等代码风格。

核心能力

  • 读取 .editorconfig 覆盖用户和工作区设置
  • 支持 indent_style、indent_size、tab_width 等缩进属性
  • 保存时应用 end_of_line、insert_final_newline、trim_trailing_whitespace
  • 支持 charset 字符集设置
  • 右键菜单可生成 .editorconfig 文件

容易踩的坑

未设置 root=true 时会继续向上查找项目外的 .editorconfig 文件;部分属性仅在保存文件时生效;用户设置 files.trimTrailingWhitespace 为 true 时 trim_trailing_whitespace=false 不生效

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.18.2
  1. v0.18.2最新正式版2026-04-08 · 2026-04-08 13:15 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/editorconfig/editorconfig-vscode/compare/v0.18.1...v0.18.2

  2. v0.18.12026-01-22 · 2026-01-22 17:56 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/editorconfig/editorconfig-vscode/compare/v0.18.0...v0.18.1

  3. v0.18.02026-01-21 · 2026-01-21 10:04 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/editorconfig/editorconfig-vscode/compare/v0.17.4...v0.18.0

  4. v0.17.42025-06-02 · 2025-06-02 16:29 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/editorconfig/editorconfig-vscode/compare/v0.17.3...v0.17.4

  5. v0.17.32025-05-31 · 2025-05-31 20:29 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/editorconfig/editorconfig-vscode/compare/v0.17.2...v0.17.3

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    EditorConfig for Visual Studio Code

    GitHub Actions Gitter

    This plugin attempts to override user/workspace settings with settings found in .editorconfig files. No additional or vscode-specific files are required. As with any EditorConfig plugin, if root=true is not specified, EditorConfig will continue to look for an .editorconfig file outside of the project.

    This repository is specific to the EditorConfig Extension for Visual Studio Code. Internally, it uses the editorconfig npm package, which is one of a few EditorConfig cores available.

    See also:

    Feel free to submit any issues you may have via the issue tracker.

    Installation

    When identifying an extension, provide the full name of the form publisher.extension. For this extension, that's editorconfig.editorconfig.

    See Extension Marketplace for more information on the multiple ways of installing VSCode extensions.

    Supported Properties

    • indent_style
    • indent_size
    • tab_width
    • end_of_line (on save)
    • insert_final_newline (on save)
    • trim_trailing_whitespace (on save)
    • charset

    How it works

    This extension is activated whenever you open a new text editor, switch tabs into an existing one or focus into the editor you already have open. When activated, it uses editorconfig to resolve the configuration for that particular file and applies any relevant editor settings.

    Note: some settings can only be applied on file save, as indicated above.

    A new .editorconfig file can be created via the Explorer sidebar's context menu by right-clicking in the folder where you'd like it to be and selecting Generate .editorconfig.

    Known Issues