美文网首页
vscode 格式化更美观

vscode 格式化更美观

作者: 拾钱运 | 来源:发表于2019-05-22 17:48 被阅读0次

1.文件>首选项>设置
向下滑动找到以下图片内容点击


image.png

添加如下代码

    "editor.detectIndentation": false,
    "editor.tabSize": 4,
image.png

2.在项目根目录中创建.editorconfig文件

root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false

3.安装插件Beautify 格式化插件


image.png

使用方法:
找到您需要格式化的代码文件,按F1 然后选择你要格式化的文件类型
先点击


image.png
然后
image.png

就大功告成了

相关文章

网友评论

      本文标题:vscode 格式化更美观

      本文链接:https://www.haomeiwen.com/subject/kxauzqtx.html