用户设置
首先进行字体相关的设置,键入ctrl-shift-p
快捷键,输入setting
回车进入设置界面,在右侧用户设置中粘贴以下配置:
{
// 字体大小
"editor.fontSize": 17,
// 控制终端的字号(以像素为单位)。
"terminal.integrated.fontFamily": "'Fira Code', 'Operator Mono', 'iA Writer Duospace', 'Source Code Pro', Menlo, Monaco, monospace",
"terminal.integrated.fontSize": 16,
// 行高
"editor.lineHeight": 24,
// 字体设置
"editor.fontFamily": "'Fira Code', 'Operator Mono', 'iA Writer Duospace', 'Source Code Pro', Menlo, Monaco, monospace",
"editor.fontLigatures": true,
// 缩进
"editor.detectIndentation": true,
"editor.renderIndentGuides": false,
// import路径移动或重命名时,自动更新
"javascript.updateImportsOnFileMove.enabled": "always",
// These are for subliminal, check them out.
"editor.hideCursorInOverviewRuler": true,
"editor.lineNumbers": "on",
"editor.overviewRulerBorder": false,
"editor.renderLineHighlight": "none",
"editor.quickSuggestions": true,
"terminal.integrated.shell.windows": "cmd.exe",
"terminal.integrated.env.windows": {"CMDER_ROOT": "D:\\cmder"},
"terminal.integrated.shellArgs.windows": ["/k", "D:\\cmder\\vendor\\init.bat"],
"git.path": "D:\\cmder\\vendor\\git-for-windows\\bin\\git.exe",
"window.zoomLevel": 1,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.wordWrap": "on"
}
实用扩展
键入ctrl-shift-p
快捷键,输入install extensions
回车进入扩展安装界面,扩展只需要搜索相应插件安装即可。
- One Dark Pro
主题 -
indent-rainbow
高亮(每行代码之前的)缩进
- Trailing Spaces
显示多余的空格
打开文件-首选项-键盘快捷方式
,点击高级自定义请打开和编辑keybindings.json
,进入键盘快捷键自定义文件,在右侧用户配置文件中添加以下配置:
{ "key": "alt+shift+t", "command": "trailing-spaces.deleteTrailingSpaces",
"when": "editorTextFocus" }
以后删除多余的空格,键入alt+shift+t
即可。
- Prettier
美化代码