Visual Studio Code 使用总结
# VS Code 常用快捷键
- 选中全部 Ctrl+Shift+L
- 文件夹全文搜索 Ctrl+Shift+F
# 插件安装
# 1.Markdown Preview Enhanced
Markdown 预览插件【右键 > Markdown Preview Enhanced:Open Preview】可以直接在 vs code 里面直接预览 Markdown
# 2.Chinese (Simplified) Language Pack for Visual Studio Code
VS Code 中文包
# 3.vscode-ext-color-highlight
颜色高亮
# 4.vscode-icons
图标美化
# 5.XML Tools
XML 语法高亮、代码格式化
# 用户配置 (个人备份)
// 将设置放入此文件中以覆盖默认设置 | |
{ | |
"files.exclude": { | |
"*.zip": true, | |
"**/*.jar": true, | |
"**/*.git": true, | |
"**/*.class": true, | |
"**/*.gz": true, | |
"**/*.doc": true, | |
"**/*.docx": true, | |
"**/*.xls": true, | |
"**/*.exe": true, | |
"**/*.xlsx": true, | |
"**/*.war": true, | |
"**/*.svn": true, | |
"**/*.hg": true, | |
"**/*.DS_Store": true, | |
"**/*.rar": true | |
}, | |
// 控制光标动画样式,可能的值为 "blink"、"smooth"、"phase"、"expand" 和 "solid" | |
"editor.cursorBlinking": "smooth", | |
// 通过使用鼠标滚轮同时按住 Ctrl 可缩放编辑器的字体 | |
"editor.mouseWheelZoom": true, | |
// 控制字体系列。 | |
"editor.fontFamily": "微软雅黑,Consolas, 'Courier New', monospace", | |
// 控制字体粗细。 | |
"editor.fontWeight": "100", | |
// 以像素为单位控制字号。 | |
"editor.fontSize": 14, | |
// 控制行高。使用 0 通过字号计算行高。 | |
"editor.lineHeight": 0, | |
// 控制行号的可见性 | |
"editor.lineNumbers": "on", | |
"workbench.colorTheme": "Monokai", | |
"workbench.startupEditor": "welcomePage", | |
"editor.wordWrap": "on", | |
"window.zoomLevel": 0, | |
"git.ignoreMissingGitWarning": true, | |
"terminal.integrated.fontFamily": "Consolas", | |
"terminal.integrated.cursorBlinking": true, | |
"terminal.integrated.cursorStyle": "line", | |
"terminal.integrated.copyOnSelection": true, | |
"terminal.integrated.scrollback": 5000, | |
"workbench.iconTheme": "vscode-icons", | |
"editor.renderWhitespace": "boundary", | |
"telemetry.enableTelemetry": false, | |
"telemetry.enableCrashReporter": false, | |
"python.linting.flake8Enabled": true, | |
"python.formatting.provider" :"yapf" | |
} |
# keybindings.json 快捷键配置 (个人备份)
// 将键绑定放入此文件中以覆盖默认值 | |
[ | |
{ | |
"key": "ctrl+d", | |
"command": "editor.action.deleteLines", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+k", | |
"command": "-editor.action.deleteLines", | |
"when": "editorTextFocus && !editorReadonly" | |
} | |
] |
# Python 相关配置
# 1.python 插件安装
搜索插件 <font color="red">python</font > 安装即可
# 2. 安装配置 flake8
自动进行 Python 代码检测
# a. 控制台运行:
pip install flake8
# b.vscode 用户配置文件 settings.json 文件中添加
"python.linting.flake8Enabled": true |
# 3. 安装配置 yapf
安装完成后 alt+shift+F 就可以格式化 Python 代码
# a. 控制台运行
pip install yapf
# b.vsvscode 用户配置文件 settings.json 文件中添加
"python.formatting.provider": "yapf" |
# 4. 安装配置 autopep8
安装完成后 alt+shift+F 就可以格式化 Python 代码
# a. 控制台运行
pip install autopep8
# b.
python.formatting.provider" :"autopep8" |