1.官网下载
2.解压VSCode-darwin-stable.zip
3.把 Visual Studio Code.app拖动到Applications 文件夹,如果没有图标,执行killall Dock命令
4.在任意文件夹用code.打开Visual Studio Code
command+shift+p
选中Shell Command: Install 'code' command in PATH
5.更换主题颜色command k + command t
6.插件安装。点击EXTENSIONS,搜索插件安装即可。
安装Vetur
语法高亮、Snippet、Emmet、语法检查、代码格式化(mac系统默认shift+alt+F)、调试等
7.字体
Operator Mono:非常好看的编程字体
Source Code Pro:adobe公司出品的等宽编程字体
Microsoft YaHei UI:windows自带
macos安装Source Code Pro步骤:
1.下载字体。.otf 格式的不支持 Windows 和 macOS,所以我们只下载 .ttf 格式的字体
2.在访达中连按所需的字体,双击打开

3.选择安装至电脑

3.解决冲突问题,删除用户下的字体

在Visual Studio Code中使用
cmd + , 编辑settings.json
{
"workbench.colorTheme": "Quiet Light",
"editor.fontFamily": "SourceCodePro-MediumIt",
//SourceCodePro-It、SourceCodePro-LightIt、SourceCodePro-MediumIt
"editor.fontSize": 14
}
8.常用快捷键
格式化代码:shift+Alt+F
上下移动一行: Option+Up 或 option+Down
向上向下复制一行: Shift+Option+Up 或 Shift+Option+Down
在当前行下边插入一行: Cmd+Enter
在当前行上方插入一行: Cmd+Shift+Enter
删除当前行:Cmd+Shift+K
跳到当前行的头部,尾部:Fn+←(Cmd+←),Fn+→(Cmd+→)
查找:Cmd+F