Stop 2013 visual studio from rearranging curly braces on a new line?

When I press the enter button, it moves the curly braces. How can I stop this? I want VS to automatically add a closing shape after I type the open brace, but I don't want it to move the shape in the input. How can i do this?

+4
source share
2 answers

I don’t know how to leave it in the line on which you typed it (since most groups set the coding style standards that they must specify in order to put the opening shape always on one line or always on a new line).

You can make VS “forget” what it should do with the curly brace by moving the cursor outside the brace block. Therefore, if you leave the Options → Formatting option set (thus, as a rule, put the bracket on the next line), you can make the open shape remain on the same line by pressing RIGHT ARROW, LEFT ARROW, ENTER (i.e. move the cursor past end bracket, then move it back between the curly braces, then enter a new line).

Not what you wanted, but this is the best I can think of.

+3

Visual Studio 2013 , :

  • : " | "
  • node " "
  • node "#"
  • node ""
  • node " "
  • " ...", , .
  • "OK"

. , / , " " , VS . " ", ( , ).

, : " ?" " , ?"

" | | | # | | " " ", , , } ;, Visual Studio #.

+10

All Articles