# VS Code Productivity Shortcuts

# General

  • Command Palette: Ctrl + Shift + P / Cmd + Shift + P
    Quickly access all commands in VS Code.

  • Quick Open: Ctrl + P / Cmd + P
    Open any file by name.

  • Toggle Terminal: Ctrl + ` / Cmd + \ Quickly open/close the integrated terminal.

  • Go to Definition: F12
    Jump to where a symbol is defined.

  • Peek Definition: Alt + F12 / Cmd + Option + F12
    Preview definition without navigating away.

  • Go to Line: Ctrl + G / Cmd + G
    Jump to a specific line number.

  • Switch Between Tabs: Ctrl + Tab / Cmd + Tab
    Cycle through open editor tabs.

# Editing

  • Multi-Cursor: Alt + Click / Option + Click
    Add multiple cursors for simultaneous editing.

  • Select Same Word: Ctrl + D / Cmd + D
    Select the next occurrence of the word under the cursor.

  • Duplicate Line: Shift + Alt + Down/Up / Cmd + Shift + D
    Duplicate the current line or selection.

  • Move Line: Alt + Down/Up / Option + Down/Up
    Move the current line up or down.

  • Format Document: Shift + Alt + F / Cmd + Shift + F
    Automatically format the document.

  • Comment Line: Ctrl + / / Cmd + /
    Comment or uncomment the current line.

# Refactoring

  • Rename Symbol: F2
    Rename all occurrences of a symbol.

# File Management

  • New File: Ctrl + N / Cmd + N
    Create a new file.

  • Save All: Ctrl + K S / Cmd + Option + S
    Save all open files.

  • Close Editor: Ctrl + W / Cmd + W
    Close the current file.

# Debugging

  • Start/Stop Debugging: F5
    Start or stop the debugger.

  • Step Over: F10
    Move over a function call while debugging.

  • Step Into: F11
    Dive into the function being called.

  • Toggle Breakpoint: F9
    Enable or disable a breakpoint.

  • Find in File: Ctrl + F / Cmd + F
    Search within the current file.

  • Global Search: Ctrl + Shift + F / Cmd + Shift + F
    Search across all files in the workspace.

# Git Integration

  • View Git Changes: Ctrl + Shift + G / Cmd + Shift + G
    Open the Git panel.

  • Commit: Ctrl + Enter
    Commit changes in the Git panel.