DarkTime
  • README
  • SpringBoot
    • spring boot 运维
    • Spring Boot 部署war包
    • springboot搭建
    • spring boot 读取配置文件
    • 简单总结
    • spring配置文件
    • spring boot Configuration
    • spring boot 配置文件
    • spring boot 配置mybatis
  • MacAwesome
    • markdown使用
    • MAC APP Awesome
    • [markdown使用](/MacAwesome/SUMMARY.md)
    • chrome
    • intellij idea
    • MacAwesome
    • VS Code 的使用
    • MAC Shell命令
  • database
    • druid使用
  • 框架
    • 项目拆析
    • 各种框架和工具
  • docker
    • kubernetes
    • docker
    • docker 常用镜像
  • 效率工具
    • 解决dns污染导致域名解析失败
    • sonarqube 相关配置
    • Iterm2 使用
    • gitbook
    • github awesome github资源推荐
    • playground 在线试用平台汇总
    • linux中的office
    • linux screen 工具
    • 简单Mock服务(moco)
    • npm
    • Visual Studio Code 的使用
    • 配置开发环境
    • homebrew的使用
    • 汇总
  • tomcat
    • tomcat目录规范
  • code_snippets
  • 专题
    • RESTful API
    • serveless服务
    • 搭建私有云主机 折腾记
    • 开发中的各种疑难杂症问题
    • spring 最佳实践
    • LLM 大语言模型
    • notelive
      • 文章框架
      • notelive vue版本开发
      • notelive 开发 札记
    • webrtc技术分析
    • 反向代理
    • spring-cloud
      • spring boot admin 监控服务
      • Spring Cloud 整理汇总
  • python
    • python 学习
    • Python 修饰器的一些小细节
  • 云主机
    • aliyun 主机的种种
  • maven
    • maven使用
    • maven项目增加编译版本号 buildnumber-maven-plugin
    • 仓库
  • java
    • java 开发常用工具类
    • java
    • apache commons pool 对象连接池
  • 大数据
    • kafka
    • gobblin
    • sqoop 简介及使用
    • hbase
    • gobblin
    • sqoop源码解析
    • hadoop map reduce
    • 大数据 学习札记
  • 脚本
    • python
      • 批量请求url 解析json数据
    • js
      • sheetjs-js读取excel
    • shell
      • 自动生成bitbook的summary文件
      • linux/mac 实用脚本
      • 自动创建tomcat项目脚本
      • 批量处理文件内容脚本
  • nginx
    • nginx
    • ngix 文件浏览器 文件服务器
  • linux
    • 群晖nas札记
    • ftp
    • linux 运维
    • 常用命令
    • linux
    • mysqldump脚本
    • 代理
    • 简易灰度部署脚本 不使用jenkins的纯shell方式
    • shell脚本
    • 附加文档
  • mysql
    • sql
  • 游戏开发
    • Unity 2020 学习笔记
  • 学习笔记
    • centos常用环境安装
    • gradle 学习
    • 建站经历
    • python
      • 爬虫教程
    • 如何解决百度爬虫无法爬取搭建在Github上的个人博客的问题? - 知乎
    • baas
      • 在本地部署Parse Server
    • mysql学习标记
    • java code snippets
    • 非Spring Boot Web项目 注册节点到Eureka Server并提供服务
    • kotlin
      • Kotlin 学习札记
    • spring cloud
    • vim配置
    • 前端
      • 开发PWA应用
  • jenkins
    • jenkins配置备份
    • gitlab触发Jenkins 自动构建
    • 安装与使用
  • npm
    • npm 使用
  • git
    • ignore
    • git使用总结
    • git配置多个远程仓库
  • 前端
    • swig
    • 解决跨域请求问题
    • angularjs 学习
    • scriptbot的前端开发经验总结
    • 各种资源
    • 一些有用的js代码
Powered by GitBook
On this page
  • 插件
  • markdown
  • 个性化设置
  • 首选项-设置
  • 首选项-键盘快捷方式
  • 任务配置

Was this helpful?

  1. 效率工具

Visual Studio Code 的使用

PreviousnpmNext配置开发环境

Last updated 6 years ago

Was this helpful?

[TOC]

插件

插件的快捷键配置、使用说明都在的首页中

  • JSON Tools (eriklynd.json-tools)

    Tools for manipulate JSON. You can pretty/minify JSON with this extension.

  • Git History (git log) (donjayamanne.githistory)

    View git log along with the graph and details.

  • REST Client (humao.rest-client)

    REST Client allows you to send HTTP request and view the response in Visual Studio Code directly.

  • SQL Beautify (sensourceinc.vscode-sql-beautify)

    格式化sql,人气较低,不太好用

  • 将vscode的设置同步到gist来存储

markdown

  • markdownlint :语法提示

  • Markdown All in One :All you need for Markdown (keyboard shortcuts, table of contents, auto preview and more).

  • Markdown Preview Enhanced :强推,md预览

  • Markdown PasteURL :快捷的粘贴url地址

  • Markdown Paste :快捷的粘贴图片

个性化设置

Settings File Locations Depending on your platform, the user settings file is located here: Windows %APPDATA%\Code\User\settings.json Mac $HOME/Library/Application Support/Code/User/settings.json Linux $HOME/.config/Code/User/settings.json

首选项-设置

VSCode的设置是json形式的配置,做了图形化显示,设置分为用户设置和工作区设置,工作区设置就是保存在当前工作区的settings.json,用户设置则是全局的。自定义的设置是一个新的json配置文件,里面的配置会覆盖系统默认配置文件,所以不用担心修改错了东西而改不回去

{
    "rest-client.environmentVariables": {
        "local": {
            "host": "localhost",
            "token": "test token"
        },
        "production": {
            "host": "example.com",
            "token": "product token"
        }
    },
    "terminal.integrated.fontFamily": "'Meslo LG L DZ for Powerline'",
    "workbench.activityBar.visible": true,
    "java.errors.incompleteClasspath.severity": "ignore",
    "workbench.iconTheme": "vs-seti",
    "files.autoGuessEncoding": false,
    "workbench.editor.closeOnFileDelete": false,
    "gitHistory.showEditorTitleMenuBarIcons": false,
    "workbench.statusBar.feedback.visible": false,
    "pasteImage.path": "./media"
}
  • terminal.integrated.fontFamily

  • "files.hotExit": "onExit"

    是否允许热退出,即文件未保存的情况下也可以退出编辑器,下次打开会恢复,默认是允许的。

其他首选项设置

  • problems.decorations.enabled

    文件图标上显示错误信息的数字提示。The number of errors/warnings is shown in the decoration. The setting problems.decorations.enabled allows you to enable/disable the error/warning decorations.

首选项-键盘快捷方式

键盘快捷键设置也是json格式,与系统设置原理一样,默认打开是图形化界面,但是可以进入高级自定义修改keybindings.json文件 这里除了定义系统按键也可以定义插件(json设置中以extesion前缀)的按键设置,当然 插件的快捷键也可以在插件的首页里进行配置更为清晰

// 将键绑定放入此文件中以覆盖默认值
[
    {
        "key": "cmd+/",
        "command": "editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+/",
        "command": "editor.action.commentLine",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+d",
        "command": "editor.action.deleteLines",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "cmd+alt+l",
        "command": "editor.action.formatDocument",
        "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
    },
    {
        "key": "cmd+d",
        "command": "editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+cmd+j",
        "command": "extension.prettyJSON"
    },
    {
        "key": "ctrl+cmd+m",
        "command": "extension.minifyJSON"
    },
    {
        "key": "cmd+.",
        "command": "-editor.action.quickFix",
        "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
    },
    {
        "key": "cmd+[Period]",
        "command": "editor.action.quickFix"
    },
    {
        "key": "ctrl+[Backquote]",
        "command": "workbench.action.terminal.toggleTerminal"
    }
]

任务配置

typescript的一键编译任务

//自动运行tsc编译当前窗口的文件,并使用node命令来执行编译后的js文件
{
    "label": "Run tests",
    "type": "shell",
    "command": "(echo ${file}|awk -F '.' '{print $1}'|xargs tsc) && (echo ${file}|awk -F '.' '{print $1}'|xargs node)",
    "group": {
        "kind": "build",
        "isDefault": true
    },
    "presentation": {
        "reveal": "always",
        "panel": "shared"
    }
}

调整终端的字体,如果之前使用了oh-my-zsh的终端主题,该主题使用了Powerline的字体(有一些特殊符号),所以在vsCode集成的终端控制台也应该修改字体

Settings Sync
fontShow