Visual Studio Code的用户设置相关

时间:2022-07-24
本文章向大家介绍Visual Studio Code的用户设置相关,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

快捷键ctrl ,打开设置,或者在命令提示行里,输入open settings:

workspace setting: located under the .vscode folder in your root folder.

.vscode文件夹里有个extensions.json文件,里面存放了项目组推荐安装的Visual Studio Code扩展,例子:

{
  "recommendations": [
    // Angular Language Service
    "Angular.ng-template",
    // Debugger for Chrome
    "msjsdiag.debugger-for-chrome",
    // Prettier - Code formatter
    "esbenp.prettier-vscode",
    // The ng lint command uses TSLint under the hood.
    "ms-vscode.vscode-typescript-tslint-plugin"
  ]
}

启动Visual Studio Code,会收到推荐安装的插件提示:

点击install all即可:

成功安装:

Recommended settings are stored in recommended-settings.json file. Developers that do wish to follow these settings will have to opt-in by creating settings.json in .vscode folder and copying the whole content over.

If you already have settings.json, then you need to manually merge settings from recommended-settings.json. This is not an automated process, so you should check occasionally for an updated version of recommended-settings.json.