如何在保存时在Visual Studio中自动设置代码格式?

时间:2020-01-21 10:47:20

标签: javascript html visual-studio

在保存到Visual Studio中像Visual Studio Code一样可以自动格式化HTML和Javascript代码吗?

1 个答案:

答案 0 :(得分:3)

不确定这是问您问题的正确地方。

无论如何,微软提供的这个插件似乎可以满足您的要求:

https://marketplace.visualstudio.com/items?itemName=mynkow.FormatdocumentonSave

Enables auto formatting of the code when you save a file. Visual Studio supports auto formatting of the code with the CTRL+E,D or CTRL+E,F key shortcuts but with this extension the VS command 'Format Document' is executed on Save