A
A
Alexey Arkh2018-05-30 18:31:05
IntelliJ IDEA
Alexey Arkh, 2018-05-30 18:31:05

Why does the intellij idea in the files of the web directory have an indentation of two spaces, and the rest four?

Good afternoon.
In the project, the files are indented by 4 spaces, but if the files are in the web folder, then there are indented 2 spaces in the same files.
That is, I take the file at the root of test.php, put 4 spaces there, copy it to web or any web subfolder, indent it, put 2 spaces.
At the same time, everything is fine in other projects in the web folder.
.idea deleted
web renamed to web1
Nothing helps, the feeling that there is some kind of settings file in the web, but I don’t see anything like that.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Arkh, 2018-05-30
@AlekseyArh

Found the file.
It's called .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

[composer.json]
indent_size = 4

If you change indent_size = 2 to indent_size = 4, everything falls into place.
EditorConfig - One Settings for all Editors/IDEs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question