| 常用键 | indent_style / indent_size / end_of_line / charset / trim_trailing_whitespace / insert_final_newline |
|---|---|
| 生效 | 编辑器读取最近配置,root = true 截止向上查找 |
.editorconfig 示例
.editorconfig 示例
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{js,ts,json}]
indent_size = 2EditorConfig 管基础(缩进、行尾),格式化器管更细的风格。