您的位置 首页 技术

vscode自动格式化代码

首先在code中安装 Prettier -Code formatter[代码格式化程序] 第二步在菜单栏中打开设置 第三步在搜索条搜索prettier,点击在settings中编辑…

首先在code中安装 Prettier -Code formatter[代码格式化程序]

6e1dd872441e6caf8ca3198f7d90d8b.png

第二步在菜单栏中打开设置

380e545149939aa47318e974d96a588.png

第三步在搜索条搜索prettier,点击在settings中编辑

12b337c8db025849435e8944b969195.png

第四步添加一条保存时格式化代码的语句

"editor.formatOnSave": true

24fc0ef558dfdc75433d9a1d3d8f99e.png

如果出现错误有可能是在上一条语句中结尾没有加 逗号

加上即可

865b8257653cc8f0a8725c7f6243031.png

相关文章教程推荐:vscode教程

以上就是vscode自动格式化代码的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/35871.html

为您推荐

返回顶部