visual studio code的使用

1、添加代码片段

参考:https://blog.csdn.net/qq_36370731/article/details/83014439

2、在vscode上运行Git

先打开vscode内置的Git:F1,输入Show built-in Extensions, 左侧列表中找Git,然后启用

配置git.path:在设置中搜索 git.path ,在用户设置中修改 git.path 字段值,如果没有该字段就自己添加,字段值是 Git的可执行程序的路径, 符号换成 /

 3、vscode 格式化vue文件

参考:https://www.cnblogs.com/mlw1814011067/p/9614795.html

4、vscode 设置 VUE 文件格式化标签属性不换行

{
  "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto"
        },
        "prettyhtml": {
            "printWidth": 100,
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        }
  }
}

参考:https://www.cnblogs.com/sunjinggege/p/8809536.html

5、vscode同步插件

vscode 中按住 shift + alt + d 可下载。

参考:https://www.jianshu.com/p/c10ac793eec0https://www.cnblogs.com/chengfeng6/p/10567200.html

6、vscode禁止粘贴后自动格式化

参考:https://blog.csdn.net/weixin_34247299/article/details/91443522

原文地址:https://www.cnblogs.com/wenxuehai/p/10417222.html