Christian-health / StudyNote2017

2017年学习笔记
0 stars 0 forks source link

EditorConfig 学习 #18

Open Christian-health opened 6 years ago

Christian-health commented 6 years ago

EditorConfig 介绍 : http://www.jianshu.com/p/712cea0ef70e

安装与编辑器对应的 EditorConfig 插件。 其工作原理是:当你在编码时,EditorConfig 插件会去查找当前编辑文件的所在文件夹或其上级文件夹中是否有 .editorconfig 文件。如果有,则编辑器的行为会与 .editorconfig 文件中定义的一致,并且其优先级高于编辑器自身的设置。

就是说你有一个编辑器,然后这个编辑器安装了EditorConfig插件,然后这个插件发现有项目代码中有editorconfig文件,那么这个文件中的设置就会比编辑器自身设定的选项高,那么这个时候就可以统一,各个开发人员的编辑规则了。

Christian-health commented 6 years ago

.editorconfig 文件完整的设置: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

Christian-health commented 6 years ago

editorconfig 官方网站 :http://editorconfig.org/