Visual Studio Code配置

简介: typings插件1 typings智能提示工具如果未安装node, 请先安装nvm(node版本管理工具)安装typingsnpm install -g typings更新typingsnpm update -g typescript安装提示补全,需要进入到项目根目录下,安装完后,会在根目录下出现一个typings的


1 typings

  • 智能提示工具
  • 如果未安装node, 请先安装nvm(node版本管理工具)
  • 安装typings

    npm install -g typings
  • 更新typings

    npm update -g typescript
  • 安装提示补全,需要进入到项目根目录下,安装完后,会在根目录下出现一个typings的文件夹
  • 安装node.js补全

    typings install dt~node --global
  • 安装koa补全

    typings install dt~koa
  • 开启智能提示

    • 方法1 在需要智能提示的文件顶部添加提示信息文件所在的目录,注意文件之间的相对位置

      /// <reference path="./typings/index.d.ts" />
    • 方法2 在项目的根目录下添加一个jsconfig.json文件,内容可以参考JavaScript in VS Code

      {
          "compilerOptions": {
              "target": "ES6"
          },
          "exclude": [
              "node_modules",
              "**/node_modules/*"
          ]
      }
      • 对提示有特殊要求的自行参看文档,没有特殊要求的就用上面的这个。

2 插件

  • Auto Close Tag: 匹配标签。
    • 当输入<h1>时会自动出现</h1>
  • Atom One Dark Theme: 主题
  • Auto-Open Markdown Preview: markdown实时预览
  • Auto Rename Tag: 修改标签辅助。
    • 修改一个会自动修改另一个
  • beautify: 代码格式化工具。
    • 按F1, 输入beautify file或者beautify selection,选择并确定。
  • colorize: 在css中写颜色相关代码时显示颜色。
  • ESlint: 语法错误检查,默认已安装
  • fileheader: 添加文件头部注释。
    • ctrl+alt+i会在文件头部添加注释,在全局设置中找到fileheader相关进行设置
  • Git History: git历史记录
  • HTML Snippets: H5代码片段以及提示。

    • 需要在全局设置中找到 files.associations 进行设置
    "files.associations": {
        // extension name : html
        "*.tpl": "html",
        "*.js": "html"
    }
  • HTML CSS Support: 让HTML标签上写class智能提示当前项目所支持的样式
  • HTMLHint: Html代码检测
  • JavaScript Atom Grammar: atom风格的语法高亮
  • JavaScript (ES6) code snippets: ES6语法代码段
  • jQuery Code Snippets: jQuery提示工具
  • markdownlint: markdown格式提示
    • 按下F8看效果
  • npm: npm支持
  • Npm Intellisense: node.js require提示
  • Path Intellisense: 路径智能提示
  • Path Autocomplete: 路径智能补全
  • Project Manager: 多个项目切换工具
    • 按F1,输入Project Manager: Save Project
    • 输入一个名称表示当前项目
    • 按F1,输入Project Manager: List Project To Open
    • 选择想要打开的项目,然后确认
  • TODO Parser: TODO管理
    • 打开当前文件,在工具的底部左侧,有一个文档图标的表示TODO的个数
    • 按F1,输入TODO,可以看见Prase TODOs(all files)和Prase TODOs(current documents)两个选择
  • vscode-icons: 给资源目录加上图标,非常棒
相关文章
|
1月前
|
存储 C++
【C++】Visual Studio C++ 配置并使用gtest(不好用你捶我)
【C++】Visual Studio C++ 配置并使用gtest(不好用你捶我)
|
1月前
|
C++ Python
【Pybind11】pybind11在visual studio中的配置
【Pybind11】pybind11在visual studio中的配置
|
2月前
|
JavaScript
Visual studio Code 配置用户代码片段---Vue为例
Visual studio Code 配置用户代码片段---Vue为例
|
4月前
|
并行计算 C++ Windows
windows10下visual studio 2019安装以及cuda11配置
windows10下visual studio 2019安装以及cuda11配置
|
5月前
|
定位技术 C++
Visual Studio复制、拷贝C++项目与第三方库配置信息到新的项目中
Visual Studio复制、拷贝C++项目与第三方库配置信息到新的项目中
|
5月前
|
定位技术 计算机视觉 C++
C++计算机视觉库OpenCV在Visual Studio 2022的配置方法
C++计算机视觉库OpenCV在Visual Studio 2022的配置方法
|
5月前
|
定位技术 开发工具 C++
C++绘图库matplotlibcpp在Visual Studio中的配置方法
C++绘图库matplotlibcpp在Visual Studio中的配置方法
|
5月前
|
编译器 数据处理 C++
Visual Studio配置并编译C++环境下GDAL库、SQLite环境与PROJ库的方法
Visual Studio配置并编译C++环境下GDAL库、SQLite环境与PROJ库的方法
|
5月前
|
定位技术 数据处理 C++
Visual Studio软件调用已经配置、编译好的C++第三方库的方法
Visual Studio软件调用已经配置、编译好的C++第三方库的方法
|
5月前
|
存储 定位技术 C++
Armadillo矩阵库在Visual Studio软件C++环境中的配置方法
Armadillo矩阵库在Visual Studio软件C++环境中的配置方法