[TOC]
vscode配置使用
插件安装使用
- 联网情况下,直接安装插件
- 离线安装插件
设置主题
通过下载插件来完成
主题插件: Eva Theme, One Dark, Monokai Dammed
同步vscode配置到github
settings sync, 最新的版本可以直接登录github帐号选择要同步的配置版本
同步: ctrl + shift + p, 输入 sync Update
下载: ctrl + shift + p, 输入 sync Download
markdown插件
- markdown插件
- markdown in one, markdwon一些快捷操作集合(有一些还是要设置,ctrl + b 粗体跟显示侧边栏冲突)
- table format, 表格格式化工具(ctrl + shift + p, table 调出命令)
- markdown preview, 预览插件(右键markdown有预览功能)
- markdown TOC, TOC生成目录(右键添加目录, 右键添加标题序号)
- markdowninit: 检测markdown的语法规范(虽然烦了点,但是挺好用的)
- markdown extended
- markdown to clipboard
- 代码编写
- 自动补全: include autocomplete
- 括号高亮匹配: Bracket Pair Colorizer
- 字符数统计: word count
- 行高亮插件: hightlight line
- 单词高亮: highlight-words(ctrl + shift + p, highlight 调出命令)
- find all references
- python环境
- python quick print, 快速显示类型
- jupyter, jupyter notebook, 特别好用,强烈推荐
- vandelay python, 自动添加包信息
- pyqt integration, pyqt5 的界面工具
- c开发环境搭建
- c/c++
- c/c++ clang command adapter
- clang-format, 自动格式化代码时用的
- Git插件
- Gitlens, 超级强大的git版本管理插件
- Git History
常用的快捷键
- 查找文件 ctrl + p
- 查找函数调用: 右键 -> find all reference
- 查找其他文件下的函数: ctrl + t
- 格式化: 右键 -> 格式化
- 转到右括号: ctrl + alt + \
- 收缩 & 展开: ctrl + alt + []
- 多行注释: ctrl + /
- 查找文件: ctrl + p
- 当前文件查找内容: ctrl + F
- 查找项目里面的内容: ctrl + shift + F
- 替换内容: ctrl + h
- 功能管理: Ctrl + Alt + P
- 跳转到上一次编辑位置: alt + 左箭头
- 跳转到下一次编辑位置: alt + 右箭头
- 查找本文件的函数: ctrl + shift + p ; @函数名
- 在查找结果里面跳转到上一个位置: F3
- ctrl + shift 12 : 查看定义预览; f12 : 跳转到定义
- 是否关闭资源管理器: Ctrl + b
MarkDown插入图片并按比例显示
<img src="/Users/soindy/Desktop/app-components-short-look_2x.png" width="100" height="100" />
<img src="./m3-上传加速方案-整体设计图.png" width="300" height="300" style="zoom:50%" />
配置参数示例
可以在vscode下面建一个 settings.json ,就可以只针对某个目录来进行配置了
可以针对全局或者仅针对单个项目文件生效
"typescript.locale": "zh-CN", // 设置中文
"editor.rulers": [80, 100], // 在一定数量的等宽字符后显示垂直标尺。输入多个值,显示多个标尺。若数组为空,则不绘制标尺。
"editor.wordWrap": "bounded", // "wordWrapColumn" 或 "bounded" 时控制编辑器列的换行
"editor.wordWrapColumn": 120, // 列数
"editor.fontSize": 15.5, // 以像素为单位控制字号
"editor.fontFamily": "Courier New", // 字体
"editor.lineHeight": 0, // 行高
"workbench.startupEditor": "newUntitledFile",// 打开编辑器时打开一个临时文件
"files.eol": "\n", // 配置文件换行的样式
"editor.trimAutoWhitespace": false, // 删除末尾随自动插入的空格
"diffEditor.ignoreTrimWhitespace": true, // 忽略末尾的空格
"files.trimTrailingWhitespace": true, // 自动去行末的空格
"search.followSymlinks": false,
"sync.autoDownload": false, // 配置同步
"sync.autoUpload": false,
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.path": "D:/env/Git/bin/git.exe",
"terminal.integrated.rendererType": "dom",
"terminal.integrated.fontSize": 14,
"terminal.integrated.shell.windows": "D:/Git/bin/bash.exe", // 设置使用git-bash作为bash
"python.pythonPath": "D:/env/Python37/python.exe", // python版本配置
"python.jediEnabled": false, // 开启自动补全
"python.autoComplete.addBrackets": true, // 自动添加括号
"python.analysis.symbolsHierarchyDepthLimit": 4,// python函数展开层数
"python.linting.pylintEnabled": true, // 启动lint的python语法检测
"python.linting.flake8Enabled": false, // 启动flake8的python语法检测
"python.formatting.provider": "yapf", // 代码格式化
"python.linting.flake8Args": ["--max-line-length=80"], // 代码格式化
"pyqt-integration.qtdesigner.path": "D:/env/Python37/Lib/site-packages/pyqt5_tools/designer.exe",
"python.autoComplete.extraPaths": [ // python路径设置
"D:/env/Python37",
"D:/env/Python37/Lib",
"D:/env/Python37/Lib/site-packages",
"D:/env/Python37/DLLs"
],
//markdown 相关
"markdown.preview.fontSize": 13, // 控制 Markdown 预览中使用的字号(以像素为单位)
"markdown.preview.linkify": false, // 在 Markdown 预览中启用或禁用将类似 URL 的文本转换为链接
"[markdown]": {
"editor.quickSuggestions": true,
// false表示不自动去掉末尾的空格
"files.trimTrailingWhitespace": false,
},
"[cpp]": {
"editor.quickSuggestions": true,
},
"[c]": {
"editor.quickSuggestions": true,
},
"C_Cpp.updateChannel": "Insiders",
"http.proxySupport": "off",
"workbench.colorTheme": "Github Light Theme",
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
网友评论