JScript Open Braces on a New Line

Menu:  Tools -> Options -> Text Editor -> JScript -> Formatting
Versions:  2008,2010
Published:  12/13/2010
Code:  vstipEdit0087

 

By default, Visual Studio will format JScript functions and control blocks with the open brace on the same line as the declaration:

image

 

 

Without getting into the big debate about whether this is good or bad, let's assume you prefer to have your braces inline vertically:

image

 

 

Just go to Tools -> Options -> Text Editor -> JScript -> Formatting and choose if you want the open brace on a new line for functions, control blocks, or both:

image