VSCode 插件 EditorConfig for VS Code

1. 前言

点击下载 EditorConfig for VS Code 插件

VSCode 编辑器本身是不支持 EditorConfig 代码格式化的,需要安装插件才可以正常使用 EditorConfig 格式化代码

2. 配置

Mac

使用【⇧ + ⌘ + P】,输入【editorconfig】,按下回车键,就可以根据 VSCode 配置自动生成 .editorconfig 文件

接下来,我们查看插件配置,发现只有两个配置项,如下图所示

Editorconfig: Generate Auto
Automatically generates an .editorconfig file according to your current editor settings.

编辑器配置:自动生成
根据当前编辑器设置自动生成 .editorconfig 文件。

该配置项的值默认为 true,当值设置为 false 时,会根据 EditorConfig 默认模板生成 .editorconfig 文件


  
  1. {
  2. "editorconfig.generateAuto": true
  3. }

Editorconfig: Template
If generateAuto is false, this template path will be used for each newly-generated .editorconfig file.

编辑器配置:模板
如果 generateAuto 为false,则此模板路径将用于每个新生成的 .editorconfig 文件。

当 generateAuto 为 false 时,该配置项才会使用到

假设 generateAuto 为 false,生成 .editorconfig 文件默认使用默认模板。我们可以自定义模板文件路径,示例如下


  
  1. {
  2. "editorconfig.template": "/Users/liang/.editorconfig_tpl"
  3. }

相关推荐

  1. vscode 安装

    2024-03-29 08:54:03       39 阅读
  2. vscode

    2024-03-29 08:54:03       18 阅读
  3. vscode开发

    2024-03-29 08:54:03       17 阅读
  4. VsCode个人

    2024-03-29 08:54:03       7 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-29 08:54:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-29 08:54:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-29 08:54:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-29 08:54:03       18 阅读

热门阅读

  1. 「PHP系列」PHP echo/print语句、数据类型详解

    2024-03-29 08:54:03       22 阅读
  2. 配置SSH后 GitHub无法使用了

    2024-03-29 08:54:03       18 阅读
  3. 详解IOS的Automatically Sign在设备上打包

    2024-03-29 08:54:03       18 阅读
  4. Flink集群启动脚本分析

    2024-03-29 08:54:03       16 阅读
  5. HTML文本信息

    2024-03-29 08:54:03       14 阅读
  6. 说说常见的几种排序算法和复杂度

    2024-03-29 08:54:03       21 阅读
  7. FlinkSQL之Flink SQL Join二三事

    2024-03-29 08:54:03       20 阅读
  8. 前端基础复习--HTML篇

    2024-03-29 08:54:03       17 阅读
  9. Linux查询|搜索|过滤|文本日志命令汇总

    2024-03-29 08:54:03       19 阅读
  10. 篇四.软件测试管理办法

    2024-03-29 08:54:03       17 阅读
  11. linux: du用法详解

    2024-03-29 08:54:03       15 阅读
  12. c++ 的左值和右值如何理解

    2024-03-29 08:54:03       16 阅读
  13. C#WPF的XAML命名空间和命名空间映射详解

    2024-03-29 08:54:03       20 阅读
  14. C# Stopwatch 计时器

    2024-03-29 08:54:03       20 阅读