When pressing enter in a multiline docblock, cursor does not got to start of next line

Some time ago, I must have messed up my settings, since I know this worked some time in the past. When I'm writing a class-level docblock, for example a property annotation:

and I press Enter to go on to write the next annotation, the cursor does not return to the start of the line but stays (roughly) in the column where it was:

Thus, I have to backspace until the start of the line before I can enter the next annotation. I searched the settings over and over, but I can not find a setting that corresponds to this behavior. Can someone enlighten me, pretty please? ;)

5 comments
Comment actions Permalink

This is controlled by Settings | Editor | Code Style | PHP | PHPDoc | Align tag comments.

Honestly, I don't think this is how it's supposed to behave, so if you need this feature, please submit the bug to our tracker: https://youtrack.jetbrains.com/newIssue?project=WI

1
Comment actions Permalink

@Christoph Harms-Ensink

>Thus, I have to backspace until the start of the line before I can enter the next annotation.

If by another annotation you mean another tag (e.g another @property) ... then just start typing it (@) right there -- cursor will move to the start of the line automatically.

 

>Honestly, I don't think this is how it's supposed to behave

But that's how it was implemented for entering aligned descriptions...

https://youtrack.jetbrains.com/issue/WI-24513

0
Comment actions Permalink

But that's how it was implemented for entering aligned descriptions...

https://youtrack.jetbrains.com/issue/WI-24513

Oh, well. Didn't look far enough to find that. Thank you, Andriy!

Although, I still think it has to be fixed in the particular Christoph's case - it's not yet a tag description there, if it was it would have a space before the caret position, so there's no need for the continuation indent.

0
Comment actions Permalink

This feature is not working... Please Rollback on this or at least do it well.

What is my cursor doing here after I hit enter?
Yes, it goes back to the beginning of the line if I press `@`, but hey, surprise, I'm not, I use auto completion by just tipping `Join`:

 

Then I press Enter and:

 

Now what? Reformat code? Press back 16 times ?


Please fix this...

 

0
Comment actions Permalink

It's been extracted into a new issue, please vote: https://youtrack.jetbrains.com/issue/WI-44259

0

Please sign in to leave a comment.