Freigeben über


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

Comments

  • Anonymous
    December 13, 2010
    The comment has been removed

  • Anonymous
    December 13, 2010
    Chris -- Not sure as my connection with the web team isn't as close as with the VS team (working on changing it).  Let me ping someone and find out.

  • Anonymous
    April 24, 2011
    The comment has been removed