YouTip LogoYouTip

Vscode Shortcut Keys

This chapter provides a comprehensive list of commonly used shortcut keys for **Visual Studio Code (VS Code)**, covering code editing, file management, debugging, and other operations to help improve your development efficiency. You can view the shortcut key settings by navigating to Code > Preferences > Keyboard Shortcuts in the menu bar: !(#) Using the keyboard shortcuts editor, you can customize keyboard shortcuts according to your needs to further enhance your development efficiency. Notes: 1. On **macOS**, the `Cmd` key corresponds to the `Ctrl` key on Windows/Linux. 2. On **macOS**, the `Option` key corresponds to the `Alt` key on Windows/Linux. 3. Some shortcut keys may vary depending on your system or configuration. * * * ### 1. General Operation Shortcuts | Function | Windows/Linux | macOS | | --- | --- | --- | | Open Command Palette | `Ctrl + Shift + P` | `Cmd + Shift + P` | | Open Settings | `Ctrl + ,` | `Cmd + ,` | | Open Terminal | `Ctrl + `` | `Ctrl + `` | | New Window | `Ctrl + Shift + N` | `Cmd + Shift + N` | | Close Window | `Ctrl + Shift + W` | `Cmd + Shift + W` | | Save File | `Ctrl + S` | `Cmd + S` | | Save All | `Ctrl + K S` | `Cmd + Option + S` | | Toggle Auto Save | Search for **Auto Save** after `Ctrl + Shift + P` | Same as above | | Quick Open, Go to File | `Ctrl + P` | `Cmd + P` | | Keyboard Shortcuts Settings | `Ctrl + K, Ctrl + S` | `Cmd + K, Cmd + S` | * * * ### 2. File and Editor Operations | Function | Windows/Linux | macOS | | --- | --- | --- | | New File | `Ctrl + N` | `Cmd + N` | | Open File | `Ctrl + O` | `Cmd + O` | | Save File | `Ctrl + S` | `Cmd + S` | | Save As | `Ctrl + Shift + S` | `Cmd + Shift + S` | | Close File | `Ctrl + W` | `Cmd + W` | | Close All Files | `Ctrl + K, Ctrl + W` | `Cmd + K, Cmd + W` | | Reopen Closed File | `Ctrl + Shift + T` | `Cmd + Shift + T` | | Open Folder | `Ctrl+K O` | `Cmd+K O` | | Previous File | `Ctrl+Tab` | `Cmd+Tab` | | Next File | `Ctrl+Shift+Tab` | `Cmd+Shift+Tab` | | Switch Editor Layout | `Alt+Shift+Number` | `Cmd+Option+Number` | | Toggle Full Screen | `F11` | `Ctrl+Cmd+F` | * * * ### 3. Code Editing Shortcuts | Function | Windows/Linux | macOS | | --- | --- | --- | | Undo | `Ctrl + Z` | `Cmd + Z` | | Redo | `Ctrl + Y` | `Cmd + Y` | | Copy | `Ctrl + C` | `Cmd + C` | | Cut | `Ctrl + X` | `Cmd + X` | | Paste | `Ctrl + V` | `Cmd + V` | | Find | `Ctrl + F` | `Cmd + F` | | Replace | `Ctrl + H` | `Cmd + H` | | Select All | `Ctrl + A` | `Cmd + A` | | Format Code | `Shift + Alt + F` | `Shift + Option + F` | | Comment Line | `Ctrl + /` | `Cmd + /` | | Multi-line Comment | `Shift + Alt + A` | `Shift + Option + A` | | Duplicate Current Line | `Alt + Shift + Down` | `Option + Shift + Down` | | Delete Current Line | `Ctrl + Shift + K` | `Cmd + Shift + K` | | Move Current Line | `Alt + Up/Down` | `Option + Up/Down` | | Select Current Line | `Ctrl + L` | `Cmd + L` | | Find and Replace | `Ctrl + H` | `Cmd + Option + F` | | Go to Line Number | `Ctrl + G` | `Cmd + G` | | Insert Line Below | `Ctrl + Enter` | `Cmd + Enter` | | Insert Line Above | `Ctrl + Shift + Enter` | `Cmd + Shift + Enter` | | Jump to Matching Bracket | `Ctrl + Shift + ` | `Cmd + Shift + ` | | Indent/Unindent | `Ctrl + ] / [` | `Cmd + ] / [` | | Go to Beginning/End of Line | `Home / End` | `Cmd + ← / β†’` | | Go to Beginning/End of File | `Ctrl + Home / End` | `Cmd + ↑ / ↓` | | Collapse/Expand Region | `Ctrl + Shift + [ / ]` | `Option + Cmd + [ / ]` | | Toggle Block Comment | `Shift + Alt + A` | `Option + Shift + A` | | Toggle Auto Wrap | `Alt + Z` | `Option + Z` | * * * ### 4. Multi-Cursor Operations | Function | Windows/Linux | macOS | | --- | --- | --- | | Insert Cursor | `Alt + Click` | `Option + Click` | | Insert Cursors Above/Below | `Ctrl + Alt + ↑ / ↓` | `Option + Cmd + ↑ / ↓` | | Undo Last Cursor Operation | `Ctrl + U` | `Cmd + U` | | Select Current Line | `Ctrl + L` | `Cmd + L` | | Select All Matches | `Ctrl + F2` | `Cmd + F2` | | Column Selection | `Shift + Alt + Drag` | `Shift + Option + Drag` | | Select All Matches | `Ctrl + Shift + L` | `Cmd + Shift + L` | | Select Next Match | `Ctrl + D` | `Cmd + D` | * * * ### 5. Debugging Shortcuts | Function | Windows/Linux | macOS | | --- | --- | --- | | Start Debugging | `F5` | `F5` | | Stop Debugging | `Shift+F5` | `Shift+F5` | | Step Over | `F10` | `F10` | | Step Into | `F11` | `F11` | | Step Out | `Shift+F11` | `Shift+F11` | | Toggle Breakpoint | `F9` | `F9` | * * * ### 6. Search and Navigation | Function | Windows/Linux | macOS | | --- | --- | --- | | Global Search | `Ctrl+Shift+F` | `Cmd+Shift+F` | | Go to Definition | `F12` | `F12` | | Go to Declaration | `Ctrl+F12` | `Cmd+F12` | | Find References | `Shift+F12` | `Shift+F12` | | Show Outline | `Ctrl+Shift+O` | `Cmd+Shift+O` | | Go to Previous Location | `Ctrl+Alt+Left` | `Cmd+Option+Left` | | Go to Next Location | `Ctrl+Alt+Right` | `Cmd+Option+Right` | * * * ### 7. Version Control | Function | Windows/Linux | macOS | | --- | --- | --- | | Open Version Control View | `Ctrl+Shift+G` | `Cmd+Shift+G` | | Commit Code | `Ctrl+Enter` | `Cmd+Enter` | | View Changes | `Ctrl+Shift+D` | `Cmd+Shift+D` | * * * ### 8. Terminal Operations | Function | Windows/Linux | macOS | | --- | --- | --- | | Show Integrated Terminal | `Ctrl + `` | `Ctrl + `` | | New Terminal | `Ctrl+Shift+``` | `Cmd+Shift+``` | | Switch Terminal | `Ctrl+PageUp/PageDown` | `Cmd+PageUp/PageDown` | | Close Terminal | `Ctrl+Shift+W` | `Cmd+Shift+W` | ### 9. Command Palette | Operation | Windows/Linux | macOS | | --- | --- | --- | | Open Command Palette | `Ctrl + Shift + P` | `Cmd + Shift + P` | | Open Keyboard Shortcuts Reference | `Ctrl + K, Ctrl + S` | `Cmd + K, Cmd + S` | ### 10. Display | Function | Windows/Linux | macOS | | --- | --- | --- | | Toggle Full Screen | `F11` | `Cmd + Ctrl + F` | | Zoom In/Out | `Ctrl + = / -` | `Cmd + = / -` | | Toggle Sidebar Visibility | `Ctrl + B` | `Cmd + B` | | Show Explorer | `Ctrl + Shift + E` | `Cmd + Shift + E` | | Show Search | `Ctrl + Shift + F` | `Cmd + Shift + F` | | Show Source Control | `Ctrl + Shift + G` | `Cmd + Shift + G` | | Show Debug | `Ctrl + Shift + D` | `Cmd + Shift + D` | | Show Extensions | `Ctrl + Shift + X` | `Cmd + Shift + X` | ### 11. Extension Operations | Operation | Windows/Linux | macOS | | --- | --- | --- | | Install Extension | `Ctrl + Shift + X` | `Cmd + Shift + X` | | Manage Extensions | `Ctrl + Shift + P` β†’ Type "Extensions" | Same as above | ### 12. Other | Function | Windows/Linux | macOS | | --- | --- | --- | | Open Markdown Preview | `Ctrl + K, V` | `Cmd + K, V` | | Zen Mode | `Ctrl + K, Z` | `Cmd + K, Z` | * * * ## Official Shortcut Key Documentation ### Windows Platform !(#) ### macOS Platform !(#) ### Linux Platform !(#) * * * The above shortcuts can be customized via **Key Bindings Settings**. In VS Code, press `Ctrl+K Ctrl+S` (or `Cmd+K Cmd+S` on macOS) to open the key bindings page, where you can easily query and modify shortcuts.
← Python ScrapyVue3 Vscode β†’