Joey Joey - 5 months ago 9
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?


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.