Indent being added on line after comment

Here's a weird new one... I open a php tag somewhere after the html, put a nice little comment after it to designate the section, hit Enter (Windows), and for some reason the next line becomes indented:

I have to hit Ctrl+Shift+Left to select the indent to get the caret to start at the beginning of the line... if I don't, then hitting Enter after any of the new code lines also indent them, going against normal (and PHPStorm default) convention to not indent code lines after the php open tag.

The same thing happens if the comment is on its own line:

I know this is a corner case and I probably shouldn't be doing my code this way, but I'm just putting together a new quick project (that probably won't be big) and for now doing it this way makes sense, but the behavior from the editor is not making sense (and contradicting itself).

Anyone know how to fix this?! I'm tired of all the keypresses to try to get PHPStorm to make sense with itself like in this weird case.

0

And once again, I was not able to reproduce it on default settings and questions are the same :)

Just in case:

- What version of IDE do you have installed?

- Did you change anything in Code Style settings already? (or do you have an Editorconfig file?)

0

请先登录再写评论。