Braces placement "next line shifted" doesn't work

It works like "next line shifted2", so I have to press backspace everytime I enter a new line.
Is it a bug, or I ignored some options?

My IntelliJ IDEA's version is 9.0.1, I worked in javascript files.

2 comments

Youtrack issue please

On 04.03.2010 22:37, hou feng wrote:

It works like "next line shifted2", so I have to press backspace everytime I enter a new line.
Is it a bug, or I ignored some options?

>

My IntelliJ IDEA's version is 9.0.1, I worked in javascript files.

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5257897#5257897



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

In "Code Style - Alignment and Braces - Braces Placement", I set all of the 3 select lists as "Next line shifted". Then in the preview the code sytle is:

                if (x > 0)
                    {
                    int someVariable = a ? x : y;
                    int anotherVariable = a ? x : y;
                    }
                else
                    {
                    label2:
                    for (int i = 0; i < 5; i++)
                        doSomething(i);
                    }


But when I typed a left brace at the next line, and press Enter, the caret was indented to the right of the braces:

                function a()
                    {
                        |      (<- caret)
                    }


When I delete the blanks before the caret, and press Enter when I finish this line, the caret will still be indented, so I have to delete the blanks every time I create a new line:

                function a()
                    {

                    var b;
                        |      (<- caret)
                    }



Fortunately, I found the option "Editor - Smart Keys - Enter - Smart indent". After I unselected it, the problem disappeared.
I don't know whether this will bring new problems to me, but the current problem has been solved.

Thank you.

0

Please sign in to leave a comment.