1 year ago

#184852

test-img

Robert Fischbacher

Visual Studio 2019/2022 Enter Key Behavior at the end of a C# curly brace block

I'm annoyed by the behavior of Visual Studio 2022 when pressing the Enter key at the end of a curly brace block. Inconveniently, the cursor is positioned at the first column of the new line. I think, it would be better if the cursor was positioned at the same level as the closing curly brace above.

Do you know where to set that in the settings? This is my example:

namespace MyNamespace
{
    public class MyClass
    {
        public void MyFunction()
        {
        } (!) Pressing Enter Key here ... 
(!) ... places the cursor at the first column of this line 

        (!) However, I would like the cursor to be positioned below the 
            closing curly brace of the block above 
    }   
}   

Notepad++ for example behaves exactly as I would expect. Any suggestions?

key

behavior

enter

visual-studio-2022

0 Answers

Your Answer

Accepted video resources