How to auto-indent when pressing Enter

I use phpStorm for my projects, but It has some issue.

When I typing code and press ENTER, but cursor is not indent.

Forumit.vn-2013-06-06_021248.png

I want to indent like this image:

Forumit.vn-2013-06-06_021507.png

Please help me !

5 comments
Comment actions Permalink

Thanks for your reply, but it's not successful !

When I press ENTER, a new line appear with a cursor not indentation.

Help me !

0
Comment actions Permalink

I just tested this and it works fine in the respect that you are indicating. However, if I don't use a closing tag (?>) and run the Reformat Code command, ALL code is also indented like this:

Capture.JPG

That's weird. Again, however, the indentation that you are requesting works correctly on my test of that Code Style (just strange behavior for no closing tag.)

What are your PHP->Tabs and Indents settings?

0
Comment actions Permalink

I understand why it is not indentation !

If I delete the end php tag, indentation will not work.

So, I have to add the end tag php to auto-indentation when press Enter.

0
Comment actions Permalink

No, it should not work like that (and doesn't on mine.) Windows, Linux or Mac?

0

Please sign in to leave a comment.