Can I make Visual Studio place curly braces on the same line as an if statement (in HTML)?

前端 未结 2 1939
遥遥无期
遥遥无期 2020-12-13 08:14

In Visual Studio while designing MVC views (in .aspx or .ascx files), I often use if statements. When I auto-format (Ctrl+<

相关标签:
2条回答
  • 2020-12-13 08:35

    Under ToolsOptionsText EditorC#FormattingNew 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.

    0 讨论(0)
  • 2020-12-13 08:47

    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,
    
    0 讨论(0)
提交回复
热议问题