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

前端 未结 2 1947
遥遥无期
遥遥无期 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: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,
    

提交回复
热议问题