In Visual Studio while designing MVC views (in .aspx
or .ascx
files), I often use if
statements. When I auto-format (Ctrl+<
Under Tools → Options → Text Editor → C# → Formatting → New Lines are the rules for the open brace on each case (new methods, control blocks, etc), maybe you can find the one you want there.
the formatting is handled by individual plugins, for js you can use the following setting:
// Defines whether an open brace is put onto a new line for functions or not.
"javascript.format.placeOpenBraceOnNewLineForFunctions": true,