Workflow
VS Code 有哪些快捷键?一篇文章,全部搞定!
菜鸟教程·2025-09-01 03:30

Core Points - The article provides a comprehensive list of commonly used keyboard shortcuts for Visual Studio Code on Windows, aimed at improving coding efficiency and productivity [3][6][13]. Group 1: Common Operations - Key shortcuts for general operations include: - Ctrl + Shift + P / F1: Command Palette - Ctrl + P: Quick Open file - Ctrl + Shift + N: New window - Ctrl + Shift + W: Close current window [6][13]. Group 2: Basic Editing - Essential editing shortcuts include: - Ctrl + X: Cut line without selection - Ctrl + C: Copy line without selection - Alt + ↑ / ↓: Move line up or down - Ctrl + Shift + K: Delete line [6][13]. Group 3: Navigation - Navigation shortcuts facilitate quick movement within the code: - Ctrl + T: Show all symbols - Ctrl + G: Go to a specific line - Ctrl + Shift + O: Jump to symbols within a file [7][13]. Group 4: Search and Replace - Search and replace functionalities are enhanced with: - Ctrl + F: Find - Ctrl + H: Replace - Alt + Enter: Select all occurrences of the search term [14][38]. Group 5: Multi-Cursor and Selection - Multi-cursor editing is supported by: - Alt + Click: Insert additional cursor - Ctrl + Shift + L: Select all occurrences of the current selection - Ctrl + F2: Select all occurrences of the current word [15][36]. Group 6: Code Intelligence - Code intelligence features include: - Ctrl + Space: Trigger suggestions - F12: Go to definition - Ctrl + K Ctrl + F: Format selection [8][16]. Group 7: Editor Management - Editor management shortcuts allow for efficient workspace organization: - Ctrl + : Split editor - Ctrl + K Ctrl + ← / →: Switch between editor groups - Ctrl + W: Close editor [9][40]. Group 8: File Management - File management shortcuts streamline file operations: - Ctrl + N: New file - Ctrl + O: Open file - Ctrl + S: Save file [18][41]. Group 9: Display and Debugging - Display and debugging shortcuts enhance user experience: - F11: Toggle full screen - F5: Start or continue debugging - Ctrl + `: Open integrated terminal [10][42].