由于经常使用VSCode,且经常在windows和ubuntu系统切换使用,发现有些常用快捷键会失效,一查文档对比,发现不一致的快捷键还不少,甚至有些快捷键还会缺失。特意花了点时间一一对比,整理了一下。
官方文档:
Keyboard shortcuts for Windows:https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
Keyboard shortcuts for Linux:https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf
Windows和Ubuntu不一致的快捷键
| Windows | Linux | 含义 | 使用范围 |
|---|---|---|---|
| Ctrl+Shift+W | Ctrl+W | Close window/instance | General |
| Shift+Alt + ↓ / ↑ | Copy line up/down | Basic editing | |
| Shift+Alt+A | Ctrl+Shift+A | Toggle block comment | Basic editing |
| Alt+ ← | Ctrl+Alt+ - | Go back | Navigation |
| Alt+→ | Ctrl+Shift+ - | Go forward | Navigation |
| Alt+C / R / W | Toggle case-sensitive / regex / whole word | Search and replace | |
| Ctrl+Alt+ ↑ / ↓ | Shift+Alt+ ↑ / ↓ | Insert cursor above/below | Multi-cursor and selection |
| Ctrl+Shift+Alt + (arrow key) | Column (box) selection | Multi-cursor and selection | |
| Ctrl+Shift+Alt +PgUp/PgDn | Column (box) selection page up/down | Multi-cursor and selection | |
| Shift+Alt+F | Ctrl+Shift+I | Format document | Rich languages editing |
| Alt+F12 Peek Definition | Ctrl+Shift+F10 | Peek Definition | Rich languages editing |
| Ctrl+F4, Ctrl+W | Ctrl+W | Close editor | Editor management |
| Ctrl+K S | Save All | File management | |
| Ctrl+F4 | Ctrl+W | Close | File management |
| Ctrl+Shift+U | Ctrl+K Ctrl+H | Show Output panel | Display |
| Ctrl+Shift+C | Open new command prompt/terminal | Display | |
| Ctrl+C | Ctrl+Shift+C | Copy selection | terminal |
| Ctrl+V | Ctrl+Shift+V | Paste into active terminal | terminal |
| Ctrl+↑ / ↓ | Ctrl+Shift+↑ / ↓ | Scroll up/down | terminal |
| Ctrl+Home / End | Shift+ Home / End | Scroll to top/bottom | terminal |
当然如果某些快捷键用习惯了,可以按自己喜欢的方式手动改掉。
本文详细对比了Visual Studio Code在Windows和Ubuntu系统下的默认快捷键设置,列举了不一致及缺失的快捷键,并提供了各自的功能描述。用户可以根据个人习惯自定义快捷键设置,以实现跨平台一致性。
748

被折叠的 条评论
为什么被折叠?



