VS code配置文件属性

VS code

1.首选项 -> Files.eol -> \n

2.EditorConfig for Visual Studio Code插件

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

Git配置

# clone git 时自动选择LF还是CRLF
git config --global core.autocrlf true

git config --global core.autocrlf input

git config --global core.autocrlf false

dos2unix

处理windows LF结尾符转unix CRLF

find . -type f -exec dos2unix {} \; 未测试命令

参考