2018-08-14 editorconfig配置

1 editorconfig 常用字段

(1)charset 编码格式

(2)indent_style 缩进方式

(3)indent_size 缩进大小

(4)insert_final_newline 是否让文件以空行结束

(5)trim_trailing_whitespace 自动删除文件末尾空白行

(6)max_line_length 疑似最大行宽。

2 匹配规则

image

3 实例


# top-most EditorConfig file

root = true

# Unix-style newlines with a newline ending every file

[*]

end_of_line = lf

insert_final_newline = true

# Matches multiple files with brace expansion notation

# Set default charset

[*.{js,py}]

charset = utf-8

借鉴文章:https://www.jianshu.com/p/00ac7bd5e74e

官方文档:https://editorconfig.org/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容