PHPStorm smart indenting the wrong lines.

The editor is indenting after a carriage return when 1) the code block above has been closed, and 2) when the prevailing format above is left margin aligned. Why does it do this? I turned off SmartIndent and have "solved" the problem that way, however, I find the SmartIndent feature very handy and would prefer if it were enabled.

Btw, the indent would still occur even if I didn't have that IF block. It will indent after variable, class, and function definitions as well as include and require statements...

Does this sound like a problem any one else is having and if so, have you managed to fix it?



Attachment(s):
3-20-2011 12-14-16 PM.png
8 comments
Comment actions Permalink

I think all this is happening because of namespace and this is a bug. Please submit it to http://youtrack.jetbrains.net. Thanks for spotting the issue!

0
Comment actions Permalink

This is the second time I have been directed to do your job. So far I  have made two posts - both were bugs - and I have been told to log the  issue myself both times. This is my free time, guys; I write software  for a living and would never ask one of my clients to do something that was my responsiblity. I sloppily logged the issue, but this has left an unpleasant taste in my mouth.

WI-5610

0
Comment actions Permalink

We require users to submit bug reports because we need to get various additional information and a way to provide feedback to/from original reporter.
Refusal to do so significantly reduces chances that your problem will be adressed.

0
Comment actions Permalink

Any such "requirement" for your clients to provide to you with feedback can easily be handled through a courteous request email. You don't see a chef at a restaurant asking their patrons to watch the stove while they cook the rest of their order.  Get it?

Most importantly, your argument regarding the refusal of submittal potentially holds water only if this were a feature request issue, but this obviously isn't a feature request; this is a functional defect as a result of using a popular language feature -- issues under such a classification are everyone's problem, especially yours.

0
Comment actions Permalink

That was merely constation of fact: there are hundreds of reports of various severity and reproduce/fix complexity for each developer and refusal of following established procedure will definitely reduce chances that your problem to be adressed soon.

0
Comment actions Permalink

I hear ya. You make the best IDE's on the planet; I'm thankful for that, and I could definitely be less of an ass about writing up bugs. At the same time, do you not have access to a QA department to check into concerns raised by whomever? This is what they're for, afterall. Over and out.

0
Comment actions Permalink

I'm still seeing this behavior a year after this report. If "smart indenting" is enabled then it indents when you hit enter when for instance you're writing some css and you want to jump down a line to add another rule. Disabling it means you have to manually expand block curly braces. What a hassle. I don't think this bug has been fixed unless I'm missing something.

0
Comment actions Permalink

As far as I can tell, it's been fixed since PHPStorm version 2.1.

0

Please sign in to leave a comment.