
1. 安装2. 配置# http://editorconfig.org root true [*] # 表示所有文件适用 charset utf-8 # 设置文件字符集为 utf-8 indent_style space # 缩进风格tab | space indent_size 4 # 缩进大小 end_of_line lf # 控制换行类型(lf | cr | crlf) trim_trailing_whitespace true # 去除行尾的任意空白字符 insert_final_newline true # 始终在文件末尾插入一个新行 [*.md] # 表示仅 md 文件适用以下规则 max_line_length off trim_trailing_whitespace false 作者在努力的大旭 https://www.bilibili.com/read/cv22353016/ 出处bilibili3. 使用VSCode 编辑器本身是不支持 EditorConfig 代码格式化的需要安装插件才可以正常使用 EditorConfig 格式化代码参考文献VSCode 插件 EditorConfig for VS Code-CSDN博客WebStorm与VSCode如何使用editorconfig - 哔哩哔哩前端VSCode常用插件「建议收藏」-腾讯云开发者社区-腾讯云