---
layout: single
title:  "VS Code实践"
date:   2021-03-01 00:00:00 +0800
categories: [操作系统, 编程开发]
tags: [vscode, IDE 实践 快捷键]
---

## 编辑
* 注释或取消注释 ```Command+/```
* 格式化文档 ```Option+Shift+f```

## 选择
* 多列选择 ```Option+Shift```，按住鼠标左键拖动
* 多选 ```Option```，按住鼠标左键拖动

## 转到
* 转到行号 ```Ctrl+g```
* 转到文件 ```Command+p```

## 导航
* 后退 ```Ctrl+-```
* 前进 ```Shift+Ctrl+-```

## 视图
* 自动换行 ```Option+z```

## 窗口
* 显示或隐藏Side Bar ```Command+b```
* 显示或隐藏Terminal Ctrl+`

* 多个VS Code实例切换 Command+`
* 一个VS Code实例中多个窗口切换 ```Ctrl+Tab```

## 场景
### 当有一堆图片文件使用键盘进行快速浏览
1. 按 ```Command+Shift+e``` 打开资源管理器。
2. 使用键盘的上下箭头键选择要浏览的文件。
3. 按 ```Space```(filesExplorer.openFilePreserveFocus) 打开文件保留焦点。

## 参考资料
* [vscode](https://github.com/microsoft/vscode)
* [Visual Studio Code Keyboard shortcuts for macOS](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf)
* [122 Shortcuts for Visual Studio Code](https://shortcutworld.com/VSCode/win/Visual-Studio-Code_Shortcuts)
* [使用 VSCode 打造一站式全平台开发体验](https://www.zhihu.com/search?type=content&q=vscode%20files.watcherExclude)
