尽管我们经常使用 VS Code中的许多快捷方式,但是我们有可能会忘记它们。 这里用可视化制作了一些GIF,以便更好地记住它们,希望对你有所帮助。
VSCode中的每个命令也可以通过使用CTRL + SHIFT + P
和搜索查询的命令提示符来执行。 但是知道直接快捷键速度会更快。
1. CTRL+,
打开用户设置


偶尔需要调整用户首选项,这是直接打开它们的方式。
2. CTRL+K
CTRL+S
: 显示快捷键


这是VSCode中的快捷方式的完整列表。 还可以下载下来Windows[PDF]和MacOS [PDF]。
3.CTRL+R
: 切换工作区


这将打开最近工作区的列表,并且是切换到另一个文件夹或项目的超快速方法。 请注意,如果在VS Code工作区中打开了一个终端,这会关闭当前的终端会话。
4. ALT + Z
: 切换自动换行


当我们希望看到完整的行而无需水平滚动时,它是一个方便的小帮手。
5. CTRL + G
:转到行


6. CTRL + P :转到文件


7. F8
:转到下一个错误或警告


这是单键调试,还可以使用SHIFT+F8转到以前的错误或警告。
8. CTRL + TAB
:切换选项卡


不用鼠标切换已打开文件的最快方法。
9. SHIFT + ALT + I
: 在选定的每行末尾插入光标


这对于在选定区域中快速创建多个光标很有用。
10. CTRL+L
: 选择当前行


11. CTRL + SHIFT + L
:选择所有出现的当前选择


该快捷方式确实节省了时间,因为不必在整个文件中按CTRL + D
。
12. CTRL + F2
:选择所有出现的当前单词


有了它,甚至不必选择任何东西,只需将光标放在要选择所有出现的单词上。
13. CTRL + SHIFT + SPACE
: 触发参数提示


如果我们不记得参数顺序,也不想通过查看文档来打断我们的流程,可以使用此命令。
14. SHIFT + ALT + F
: 格式化文档


15. CTRL + K
CTRL + F
:格式选择的代码


16. F12
:转到定义


17. ALT+F12
: 查看定义


这只显示了变量或函数的相应定义,而不需要移动光标。
18. F2
: 重命名变量


19. CTRL + K
CTRL + X
: 删除尾部空格


20. CTRL + K
R
: 在资源管理器中显示活动文件


21. CTRL + SHIFT + H
: 替换为文件


22. CTRL + K
V
=在右侧打开Markdown预览


23. Ctrl + K
Z
: 进入Zen模式


您可能感兴趣的文章:- VSCode Vue开发推荐插件和VSCode快捷键(小结)
- VSCode插件开发全攻略之命令、菜单、快捷键
- vscode 使用Prettier插件格式化配置使用代码详解
- vscode配置leetcode插件并解决无法登录问题(图文详解)
- 成功安装vscode中go的相关插件(详细教程)
- VSCode配置Go插件和第三方拓展包的详细教程
- Vscode常用快捷键列表、插件安装、console.log详解