Visual Studio Code Shortcut Keys - Windows

Visual Studio Code Shortcut Keys - Windows

Visual Studio Code Shortcut Keys - Windows

Visual Studio Code (VS Code) is a very popular text editor for developers. Keyboard shortcuts prepared for Windows users speed up the coding process and increase productivity. In this article, we share all the shortcut keys of VS Code with you.

General Shortcuts

  • Ctrl+Shift+P, F1: Show Command Palette
  • Ctrl+P: Quick Open, Go to File...
  • Ctrl+Shift+N: New window/instance
  • Ctrl+Shift+W: Close window/instance
  • Ctrl+,: User Settings
  • Ctrl+K Ctrl+S: Keyboard Shortcuts

Basic Editing Shortcuts

  • Ctrl+X: Cut line (empty selection)
  • Ctrl+C: Copy line (empty selection)
  • Alt+↑ / ↓: Move line up/down
  • Shift+Alt+↑ / ↓: Copy line up/down
  • Ctrl+Shift+K: Delete line
  • Ctrl+Enter: Insert line below
  • Ctrl+Shift+Enter: Insert line above
  • Ctrl+Shift+\: Go to matching bracket
  • Ctrl+[ / ]: Indent/outdent line
  • Home / End: Go to beginning/end of line
  • Ctrl+Home: Go to beginning of file
  • Ctrl+End: Go to end of file
  • Ctrl+↑ / ↓: Scroll line up/down
  • Alt+PgUp / PgDn: Scroll page up/down
  • Ctrl+Shift+[: Fold region
  • Ctrl+Shift+]: Unfold region
  • Ctrl+K Ctrl+[: Fold all subregions
  • Ctrl+K Ctrl+]: Unfold all subregions
  • Ctrl+K Ctrl+0: Fold all regions
  • Ctrl+K Ctrl+J: Unfold all regions
  • Ctrl+K Ctrl+C: Add line comment
  • Ctrl+K Ctrl+U: Remove line comment
  • Ctrl+/: Toggle line comment
  • Shift+Alt+A: Toggle block comment
  • Alt+Z: Toggle word wrap

Navigation Shortcuts

  • Ctrl+T: Show all symbols
  • Ctrl+G: Go to Line...
  • Ctrl+P: Go to File...
  • Ctrl+Shift+O: Go to Symbol...
  • Ctrl+Shift+M: Show Problems panel
  • F8: Go to next error or warning
  • Shift+F8: Go to previous error or warning
  • Ctrl+Shift+Tab: Navigate editor group history
  • Alt+← / →: Go Back / Forward

Find and Replace Shortcuts

  • Ctrl+F: Find
  • Ctrl+H: Replace
  • F3 / Shift+F3: Find next/previous
  • Alt+Enter: Select all occurrences of Find match
  • Ctrl+D: Add selection to next Find match
  • Ctrl+K Ctrl+D: Move last selection to next Find match
  • Alt+C / R / W: Toggle case sensitive / regex / whole word options

Multi-cursor and Selection Shortcuts

  • Alt+Click: Add cursor
  • Ctrl+Alt+↑ / ↓: Add cursor above/below
  • Ctrl+U: Undo last cursor operation
  • Shift+Alt+I: Insert cursor at end of each selected line
  • Ctrl+L: Select current line
  • Ctrl+Shift+L: Select all occurrences of current selection
  • Ctrl+F2: Select all occurrences of current word
  • Shift+Alt+→: Expand selection
  • Shift+Alt+←: Shrink selection
  • Shift+Alt + Mouse Drag: Column (box) selection
  • Ctrl+Shift+Alt + Arrow Key: Column (box) selection
  • Ctrl+Shift+Alt + PgUp/PgDn: Column select page up/down

Rich Language Editing Shortcuts

  • Ctrl+Space, Ctrl+I: Trigger suggestion
  • Ctrl+Shift+Space: Trigger parameter hints
  • Shift+Alt+F: Format document
  • Ctrl+K Ctrl+F: Format selection
  • F12: Go to definition
  • Alt+F12: Peek definition
  • Ctrl+K F12: Open definition to the side
  • Ctrl+.: Quick Fix
  • Shift+F12: Show references
  • F2: Rename symbol
  • Ctrl+K Ctrl+X: Trim trailing whitespace
  • Ctrl+K M: Change file language

Editor Management Shortcuts

  • Ctrl+F4, Ctrl+W: Close editor
  • Ctrl+K F: Close folder
  • Ctrl+\: Split editor
  • Ctrl+1 / 2 / 3: Focus into '1', '2' or '3' editor group
  • Ctrl+K Ctrl+← / →: Focus previous/next editor group
  • Ctrl+Shift+PgUp / PgDn: Move editor left/right
  • Ctrl+K ← / →: Move active editor group

File Management Shortcuts

  • Ctrl+N: New File
  • Ctrl+O: Open File...
  • Ctrl+S: Save
  • Ctrl+Shift+S: Save As...
  • Ctrl+K S: Save All
  • Ctrl+W: Close
  • Ctrl+K Ctrl+W: Close All
  • Ctrl+Shift+T: Reopen closed editor
  • Ctrl+K Enter: Keep editor in preview mode open
  • Ctrl+Tab: Open next
  • Ctrl+Shift+Tab: Open previous
  • Ctrl+P: Copy path of active file
  • Ctrl+R: Open previous file in Explorer
  • Ctrl+K O: Show active file in new window/instance

View Shortcuts

  • F11: Toggle full screen
  • Shift+Alt+0: Toggle editor layout (horizontal/vertical)
  • Ctrl+= / Ctrl+-: Zoom in/out
  • Ctrl+B: Toggle sidebar
  • Ctrl+Shift+E: Show/Focus Explorer
  • Ctrl+Shift+F: Show Source Control
  • Ctrl+Shift+G: Show Debugging
  • Ctrl+Shift+D: Show Extensions
  • Ctrl+Shift+H: Replace in files
  • Ctrl+Shift+J: Toggle search details
  • Ctrl+Shift+U: Show Output panel
  • Ctrl+Shift+V: Open Markdown preview
  • Ctrl+K V: Open Markdown preview to the side
  • Ctrl+K Z: Zen Mode (Esc Esc to exit)

Debugging Shortcuts

  • F9: Toggle breakpoint
  • F5: Start/Continue
  • Shift+F5: Stop
  • F11 / Shift+F11: Step into / Step out
  • F10: Step over
  • Ctrl+K Ctrl+I: Show hover info

Integrated Terminal Shortcuts

  • Ctrl+`: Show integrated terminal
  • Ctrl+Shift+`: Create new terminal
  • Ctrl+C: Copy selection
  • Ctrl+V: Paste into active terminal
  • Ctrl+↑ / ↓: Scroll up/down
  • Shift+PgUp / PgDn: Scroll page up/down
  • Ctrl+Home / End: Scroll to top/bottom

These shortcuts will help you use Visual Studio Code more efficiently. For more shortcuts and details, you can visit the Visual Studio Code Keybindings page.