Automatic indentation stopped working

Hi

In a php-project, if i type: if ($something) { and then press enter, directly after the {, phpstomr will send the cursor to a new line, indent this new line and place a } on the line below:

if ($something {
    <cursor will be here>
}

This stopped working for me. I don't know why or how.
Now, the closing } is inserted, but on pressing enter I am moved to a new line, indented in the same level as the if-statement, and still right in front of the }

How do I get the old behavier back?

-mads

2 comments
Comment actions Permalink

Hi there,

Well ... the very first place to look would be "Settings | Code Style | PHP" -- check indents values.

If all correct there -- try
1) "File | Invalidate Caches..."
2) Disable all 3rd party (not bundled) plugins
3) Try the same in brand new empty project

0
Comment actions Permalink

Hi

Tried all that, didn't help :-(

Actually, it was not phpStorm, it was  intelliJ 13.0.2 ultimate, using the php plugin.

After trying your suggestions, I tried uninstalling the php-plugin. Now, the indenting worked as I would have it, but no syntax-hightligt for php or any of the other php-stuff. Installing the plugin again, the error returned :-(

When creating a new empty project, I couldn't even create new files.

I downloaded the latest intelliJ 13.0.2, installed it, and the error went away. But it would have been nice to know what caused it in the first place.

Well, thanks for your reply.

-mads

0

Please sign in to leave a comment.