vscode usage

插件

// 图标插件
Material Icon Theme
// 代码片段
Project Snippets
括号配对着色(Bracket Pair Colorizer) 和 彩虹缩进(Indent Rainbow)


build with make

command+shift+B

When first run need create a task.json file, and select other template

格式化

Mac: Shift + Option + F

鼠标缩放字体

在文件–>首选项–>设置–>用户设置中添加如下代码:
搜索 zoom 然后选中即可,不需要输入了
"editor.mouseWheelZoom": true

集成 cmder 终端

to use the Cmder shell in VS Code, you need to add the following settings to your settings.json file:

{
"terminal.integrated.profiles.windows": {
"cmder": {
"path": "C:\\WINDOWS\\System32\\cmd.exe",
"args": ["/K", "E:\\green\\TotalCMD64\\Tools\\cmder\\vendor\\bin\\vscode_init.cmd"]
}
},
"terminal.integrated.defaultProfile.windows": "cmder"
}

shell脚本相关插件

shellman 提供智能提示和自动补全功能
shellcheck 语法错误检查
shell-format:提供代码格式化功能,快捷键:Alt+Shift+f
shell-format依赖于shfmt,在使用时会调用本地shfmt可执行文件。所以,我们要把依赖文件下载到本地。
shfmt下载地址:https://github.com/mvdan/sh/releases
下载完成,在VScode中安装shell-format,然后打开配置文件 setting.json ,在文件末尾添加如下配置:

"shellformat.path": "D:\\green\\TotalCMD64\\Tools\\shfmt_v3.4.2_windows_amd64.exe", 
"shellformat.flag": "-i=2 -sr -kp -ci",