Javascript indentation in vs2010

Hi everyone, I was wondering how I can change the vs2010 padding settings so instead it is:

function test () {
}

he will do this:

function test ()
{

}

listening to me!

Thank you

+3
source share
3 answers

In Visual Studio 2010, go to:

  • Tools> Options.
  • Expand the node text editor and select JScript . (aka JavaScript).
  • In the "Formatting" section, select the "Place an open shape in a new line for functions" checkbox.

Screenshot http://www.freeimagehosting.net/uploads/cd7619316f.png

+6
source

You may not want to do this.

, JavaScript . , .

: http://encosia.com/2011/03/21/in-javascript-curly-brace-placement-matters-an-example/

, , , , , ...

+2

Tools> Options

Check "Show all settings"

Text Editor> JScript> Formatting

Uncheck "Put an open bracket in a new line for functions"

0
source

Source: https://habr.com/ru/post/1750053/


All Articles