Why is HTML continuation indent default 8 spaces?
The default I found in Preferences > Editor > Code Style > HTML > Tabs and Indents was set to 8 before I changed it to 4:
I don't see any reason for an 8-space default... it's less readable to me than the standard 4-space indent.
Does JetBrains have some sort of logic behind this default that we should know?
Please sign in to leave a comment.
Code formatting has always been a matter of preferences. The IDE defaults can't suit everybody. You are welcome to change them in the way you like. But we aren't going to alter the defaults unless there is a strong demand for this
> Code formatting has always been a matter of preferences. The IDE defaults can't suit everybody.
This is not new knowledge, it's common knowledge; not worth stating.
> You are welcome to change them in the way you like. But we aren't going to alter the defaults unless there is a strong demand for this
I know I can change the setting as I like... I mentioned that I did. I never said you or JetBrains should change it... you're addressing the wrong issues.
I'll state it again:
I don't see any reason for an 8-space default... it's less readable to me than the standard 4-space indent. Note that this is of course my opinion, from my perspective.
Does JetBrains have some sort of logic behind this default that we should know?
^ Please answer that question, if you can. I'm of course open to anyone else stating the logic behind the 8-space default for indents in HTML. I haven't used that spacing for indents in HTML for over 10 years, back when I was writing HTML in Windows Notepad.
Logic in code style preferences? Not sure if there can be any logic here. It just looks better (or worse)
You're not understanding what I said.
There is underlying logic that determines the default number in that option. JetBrains based on some logic determined that it would be 8 spaces for an HTML indent. They have other logic determining the default of 4 spaces for other indent contexts.
The 4-space indent logic globally as a standard is 4 spaces. Why is JetBrains' logic different for HTML?
I'm literally asking what JetBrains' logic is for an 8-space indent default for HTML.
Do you know the answer? Does anyone here or at JetBrains know?
I'm asking because there might be some reason for this that I'm unaware of that might be good to know.
Please don't read into it more than that. If you have the answer, please reply. Otherwise, feel free to speculate, but don't get caught up on whether it's even valid to ask, because any chance that we learn something from it already validates it being asked.
Same here for Java. I was surpised with the latest updates about that setting. https://youtrack.jetbrains.com/issue/IDEA-293513
Hi Jetbrains, may I ask if you have any reason to add a big space like this by default
instead of this?
The problem is I'd have to adjust the settings to 4 spaces, export it, and spread it within the team.
Sorry, this is a PHP/HTML specific thread monitored by corresponding users & teams. Please submit a separate question for Java code style settings at https://intellij-support.jetbrains.com/hc/en-us/community/topics/200382555-IntelliJ-IDEA-Users or at https://youtrack.jetbrains.com/newIssue