小编Rai*_*nch的帖子

PhpStorm 不会使用 2 个空格进行缩进

抱歉,我知道以前曾问过这个问题,但其他答案对我没有任何帮助。

PhpStorm 一直使用 4 个空格来缩进,这让我抓狂。该文件是一个 .php 文件,我所知道的所有设置均已正确设置。我已经检查过这些事情:

1.) 编辑 | 代码风格| 未选中“检测并使用现有文件缩进”(并且文件无论如何都使用 2 个空格)

2.) 编辑 | 代码风格| PHP | “制表符大小”和“缩进”设置为 2 个空格

3.) 我已经重新启动了 PhpStorm

4.) 我已关闭并重新打开该文件。

5.) 我的PhpStorm是最新版本,2016.3.2

6.) 该文件的路径中只有一个.editorconfig,其内容如下:

# Drupal editor configuration normalization
# @see http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true …
Run Code Online (Sandbox Code Playgroud)

phpstorm

4
推荐指数
1
解决办法
2395
查看次数

标签 统计

phpstorm ×1