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/c10ac793eec0、https://www.cnblogs.com/chengfeng6/p/10567200.html
6、vscode禁止粘贴后自动格式化
参考:https://blog.csdn.net/weixin_34247299/article/details/91443522
7、文件夹折叠并列显示的问题
参考:https://blog.csdn.net/weixin_42162265/article/details/106207676
8、用中划线分隔的变量名能一次选中
参考:https://www.cnblogs.com/dxy9527/p/15028825.html
9、自动生成文件头部注释和函数注释
参考:https://www.cnblogs.com/suRimn/p/10450372.html
10、格式化代码改为4个空格缩进
参考:https://www.cnblogs.com/MySmallWorld/p/13564139.html
如果还是不行,看下项目有没有 .editorconfig 文件,找下里面的 indent_size 配置改为 4 即可。