ubuntu-16.04 - Editorconfig 没有关于缩进的警告
问题描述
我发现了 editorconfig 但我无法让它通知我不正确的缩进。
我在 ubuntu 16.04 上安装了 editorconfig:
editorconfig -v
EditorConfig C Core Version 0.12.0
在一个目录中,我在一个.editorconfig
文件中设置配置:
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
然后我创建一个文本文件test.txt
,仅使用 1 个空格进行缩进:
This is a test.
It only uses one space.
I would like editorconfig to notify me.
Because I set it to have 2 spaces.
当我运行命令时:
editorconfig $(pwd)/test.txt
我刚刚得到配置:
charset=utf-8
end_of_line=lf
indent_style=space
indent_size=2
insert_final_newline=true
trim_trailing_whitespace=true
tab_width=2
当我在 atom 中打开文件时(安装并激活了 atom editorconfig 插件),我确实在状态栏中看到了鼠标图标。它警告我有关whitespace
包裹的信息。
当我停用 atomwhitespace
包时,我在导航栏中看不到任何图标。
仍然在 atom 中,当我使用命令时,EditorConfig: Show State
我收到一条绿色通知,告诉我一切正常。当我使用命令EditorConfig: Fix file
时,我得到:
The file test.txt conformed to the end_of_line and indent_style properties. No changes were applied.
我在文档和互联网上到处查看。
我在这件事上花了大约一个小时。
我不明白。
显然缩进是不正确的。
不过,为什么我无法收到任何通知?
我显然错过了什么?
解决方案
推荐阅读
- android - Room Databse - 查询错误作为输入时没有可行的替代方案
- sql - 如何使用 Firebird 数据库制作账本
- angular - 取消分组(按列)在 Angular Grid(Angular 的 agGrid)中不起作用
- c# - 使用 WCF 端点时出现 400 错误请求响应
- kotlin - Kotlin ListView IndexOutOfBoundsException
- python - 如何在 python 3 中为基于文本的冒险游戏制作坐标系
- android - 找不到方法 ''void com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTest$default(com.android.build
- javascript - 如何使用 .NET Core 在服务器端评估 JavaScript 表达式?
- imagej - 我可以仅使用 imageJ-fiji 计算不同颜色的对象吗?
- sql - 在 Teradata SQL 中调整游标