# 基本技巧

VS Code比较常见的操作。

# Command Palette | 命令面板

随时随地显示命令面板

Mac: cmd + shift + (p 或 F1)
Windows/Linux: ctrl + shift + (p 或 F1)

# Quick open | 快速打开

快速打开文件

Mac: cmd + p
Windows/Linux: ctrl + p

# Displays errors and warnings | 显示错误和警告

能够快速的跳转到错误和警告的位置

Mac: shift + cmd + m
Windows/Linux: ctrl + shift + m

# Open Settings | 打开配置文件

打开settings.json

Mac: cmd + ,
Windows/Linux: File > Preferences > Settings

# Open terminal | 打开终端

快速开启终端

Mac: cmd + `
Windows/linux: ctrl + `

# File and folder management | 文件栏显示

显示或关闭文件菜单

Mac: cmd + b
Windows/Linux: ctrl + b

# Global Search | 全局搜索

局部搜索不需要按shift即可。

搜索词语

Mac: cmd + shift + f
Window/Linux: ctrl + shift + f

# 高级技巧

能够提高编程效率的技巧。

# 代码块选择

快速选中代码块

Mac: ctrl + shift + cmd + (left 或 rigt)
Windows/Linux: shift + alt + (left 或 right)

# 文件内快速定位代码

快速寻找文件内的代码

Mac: cmd + shift + o
Windows/Linux: ctrl + shift + o

# 项目内快速定位代码

快速寻找项目内的代码

Mac: cmd + t
Windows/Linux: ctrl + t

# 上下行复制

快速复制一行内容到上(下)一行

Mac: opt + shift + (up 或 down)
Windows/Linux: shift + alt + (up 或 down)

# 本行内容上下移动

将本行内容向上(下)移动

Mac: opt + (up or down)
Windows/Linux: alt + (up or down)

# 选择当前行

选择当前一行

Mac: cmd + i
Windows/Linux: ctrl + i

# 跳转到文件顶部/尾部

快速跳转到文件顶部和尾部

Mac: cmd + (up 或 down)
Windows: ctrl + (up 或 down)
Linux: ctrl + (homt 或 end)

# 代码折叠

[: 折叠
]: 展开

快速折叠代码

Mac: opt + cmd + [
Windows/Linux: ctrl + shift + [

# 打开多个窗口

快读打开多个窗口

Mac: cmd + 数字

# 跳转指定行

跳转到指定的行数

Mac: ctrl + g
Windows/Linux: ctrl + g

# 跳到文件

跳转文件

Mac: cmd + p
Windows/Linux: ctrl + p

最近更新时间: 2020/10/10 18:15:40