Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aotm 不同代码风格的缩进问题... #15

Open
aototo opened this issue Nov 30, 2017 · 0 comments
Open

aotm 不同代码风格的缩进问题... #15

aototo opened this issue Nov 30, 2017 · 0 comments

Comments

@aototo
Copy link
Owner

aototo commented Nov 30, 2017

使用 Editorconfig 来解决不同人的缩进风格

atom 编辑器
https://github.com/sindresorhus/atom-editorconfig

需要在项目根目录创建一个.editorconfig文件

下面是一个简单的demo.(ps: 这玩意要重启一下,很玄乎)

root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8

[*/*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8

[*.{json,yml}]
indent_size = 4

[*.md]
trim_trailing_whitespace = false

修改 indent_size 数值可以修改缩进的大小。

ps: atom的缩进设置在 * setting -> setting -> Editor Settings * 里面, atom-editorconfig 插件里也需要修改Tab Length

@aototo aototo changed the title aotm 缩进问题... aotm 解决不同代码风格的缩进问题... Nov 30, 2017
@aototo aototo changed the title aotm 解决不同代码风格的缩进问题... aotm 不同代码风格的缩进问题... Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant