一、实现vs code中代码格式化快捷键:【Shift】+【Alt】+F

二、实现保存时自动代码格式化:

1)文件 ------.>【首选项】---------->【设置】;

2)搜索emmet.include;

3)在settings.json下的【工作区设置】中添加以下语句:

"editor.formatOnType": true,
"editor.formatOnSave": true

4)随便写代码进行测试即可。
VSCode代码格式化快捷键及保存时自动格式化

 

相关文章:

  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2021-09-30
  • 2021-06-12
  • 2021-07-13
猜你喜欢
  • 2021-07-08
  • 2022-12-23
  • 2021-05-24
  • 2021-11-03
  • 2021-12-09
相关资源
相似解决方案