EditorConfig介绍

注:笔记仅用于记录自己的学习经历

参考:https://editorconfig.org/

http://www.alloyteam.com/2014/12/editor-config/

由于编辑器之间有差异,为了更加方便的运行代码,出现了EditorConfig来统一代码格式。

EditorConfig 插件会从文件所在目录开始逐级向上查找 .editorconfig,直到到达根目录或者找到包含属性 root=true 的 .editorconfig 文件为止。

root 表明是最顶层的配置文件,发现设为true时,才会停止查找.editorconfig文件。

[*]    所有文件都适用
charset   编码格式
end_of_line 定义换行符
indent_size = 2   tab缩进size为2
indent_style = space  tab缩进格式为space
insert_final_newline 设为true表明使文件以一个空白行结尾。
trim_trailing_whitespace设为true表示会除去换行行首的任意空白字符。
原文地址:https://www.cnblogs.com/gaoxuerong123/p/9729431.html