Skip to content

Quick Reference

Essential commands, shortcuts, and configuration for VS Code.

Keyboard Shortcuts

General

Key Action
Cmd+Shift+P Command Palette
Cmd+P Quick Open
Cmd+, Settings
Cmd+B Toggle Sidebar
++ctrl+backtick++ Toggle Terminal

Editing

Key Action
Cmd+D Select next occurrence
Cmd+Shift+L Select all occurrences
Alt+Up / Alt+Down Move line
Cmd+/ Toggle comment
Cmd+Shift+K Delete line
Shift+Alt+F Format document
Key Action
Cmd+G Go to line
F12 Go to definition
Shift+F12 Find references
Ctrl+- Go back
Cmd+Shift+O Go to symbol

Debug

Key Action
F5 Start/Continue
F9 Toggle breakpoint
F10 Step over
F11 Step into
Shift+F11 Step out

Settings Location

Platform Path
macOS ~/Library/Application Support/Code/User/settings.json
Linux ~/.config/Code/User/settings.json

Configuration Files

.vscode/
├── settings.json      # Workspace settings
├── launch.json        # Debug configurations
├── tasks.json         # Build tasks
└── extensions.json    # Recommended extensions

Essential Settings

{
  "editor.fontFamily": "JetBrains Mono",
  "editor.fontSize": 14,
  "editor.formatOnSave": true,
  "editor.minimap.enabled": false,
  "editor.tabSize": 4,
  "workbench.colorTheme": "Dracula",
  "files.trimTrailingWhitespace": true,
  "files.insertFinalNewline": true,
  "telemetry.telemetryLevel": "off"
}

Language Settings

Python

{
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.tabSize": 4,
    "editor.formatOnSave": true
  },
  "python.languageServer": "Pylance"
}

JavaScript/TypeScript

{
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2
  }
}

Essential Extensions

Python

ms-python.python
ms-python.vscode-pylance
ms-python.black-formatter
charliermarsh.ruff

JavaScript

esbenp.prettier-vscode
dbaeumer.vscode-eslint

Git

eamodio.gitlens

AI

GitHub.copilot
GitHub.copilot-chat

Productivity

streetsidesoftware.code-spell-checker
gruntfuggly.todo-tree

CLI Commands

# Open folder
code .

# Open file at line
code -g file.py:42

# Install extension
code --install-extension ms-python.python

# List extensions
code --list-extensions

# Disable extensions
code --disable-extensions

Debug Configuration

Python

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Current File",
      "type": "debugpy",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal"
    }
  ]
}

Node.js

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Node.js",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/index.js"
    }
  ]
}

Tasks

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "type": "shell",
      "command": "make build",
      "group": {
        "kind": "build",
        "isDefault": true
      }
    }
  ]
}

Workspace Recommendations

.vscode/extensions.json:

{
  "recommendations": [
    "ms-python.python",
    "esbenp.prettier-vscode"
  ]
}

File Exclusions

{
  "files.exclude": {
    "**/__pycache__": true,
    "**/node_modules": true,
    "**/.git": true
  },
  "search.exclude": {
    "**/dist": true,
    "**/build": true
  }
}

Git Settings

{
  "git.enableSmartCommit": true,
  "git.autofetch": true,
  "git.confirmSync": false
}

Terminal

{
  "terminal.integrated.fontFamily": "JetBrains Mono",
  "terminal.integrated.fontSize": 13,
  "terminal.integrated.defaultProfile.osx": "zsh"
}

Copilot Settings

{
  "github.copilot.enable": {
    "*": true,
    "*.env": false,
    "*.pem": false
  }
}

Common Commands

Command Description
Preferences: Open Settings Open settings
Preferences: Open Keyboard Shortcuts Edit keybindings
Developer: Reload Window Reload VS Code
Git: Clone Clone repository
Format Document Format current file
Rename Symbol Rename across files

Troubleshooting

Reset Settings

rm ~/Library/Application\ Support/Code/User/settings.json

Safe Mode

code --disable-extensions

View Logs

Help > Toggle Developer Tools > Console

Themes

Popular options:

  • Dracula
  • One Dark Pro
  • Tokyo Night
  • GitHub Theme
  • Catppuccin

Set in settings:

{
  "workbench.colorTheme": "Dracula"
}