信息来自官方文档 Documentation for Visual Studio Code
配置
保存时格式化
搜索 format on save
文件类型关联
搜索 file.associations
更改制表符大小
搜索 editor.tabSize
技巧
编辑技巧
- 多光标选择
要在任意位置添加光标,请用鼠标选择一个位置,然后使用Alt + Click(在macOS上为Option +单击)。
要将光标设置在当前位置之上或之下,请使用:
键盘快捷键:Ctrl + Alt +向上键或Ctrl + Alt +向下键
使用 Ctrl + Shift + L将附加光标添加到当前选择的所有实例中
- 列(盒)选择
您可以在拖动鼠标时按住Shift + Alt(在macOS上为Shift + Option)来选择文本块。一个单独的光标将被添加到每一行的末尾。
- 向上/向下复制行
键盘快捷键:Shift + Alt + 向上键或Shift + Alt + 向下键
- 上下移动行号
键盘快捷键:Alt + Up或Alt + Down
智能感知图标含义
| Methods and Functions | method, function, constructor | |
| Variables | variable | |
| Fields | field | |
| Type parameters | typeParameter | |
| Constants | constant | |
| Classes | class | |
| Interfaces | interface | |
| Structures | struct | |
| Events | event | |
| Operators | operator | |
| Modules | module | |
| Properties and Attributes | property | |
| Values and Enumerations | value, enum | |
| References | reference | |
| Keywords | keyword | |
| Files | file | |
| Folders | folder | |
| Colors | color | |
| Unit | unit | |
| Snippet prefixes | snippet | |
| Words | text |