editorconfig 的用途是为了保证开发者使用不同的编辑器所应用的配置是一致。 链接
像一些vs,webstorm都内置支持,不需要配置即可使用
在项目目录中添加一个.editorconfig文件
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
复制代码
如果是sublime需要安装插件https://github.com/xinhehui/editorconfig-sublimegithub.com/xinhehui/ed… 然后需要把这个包拷下来,放置在sublime 3的包目录里,包目录里有EditorConfig文件夹,EditorConfig里有EditorConfig.py这样的结构