Joey Joey - 2 years ago 75
Javascript Question

Set the beginning of a curly brace to a new line in Visual Studio 2015?

I am writing/debugging Javascript code in Visual Studio 2015 and hate to have the curly braces of a function starting at the end of an expression (btw: why is it like this as it is way less clearly arranged?) like:

$scope.adjusted = function () {

Instead I want to have it started by default (and after each change) in the beginning of a line like:

$scope.adjusted = function ()

Where to set such a setting in Visual Studio 2015?

Answer Source

In the menu go to...

Tools > Options > Text Editor > JavaScript > Formatting > New Lines

Set the options as required in there. You can do this individually for each of the supported languages.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download