VS Code Tips: Keyboard Shortcuts, Settings, Extensions and Workflows That Save Time
A practical collection of VS Code tips and tricks: the keyboard shortcuts worth memorizing (Windows, Linux and macOS), a curated settings.json, multi-cursor editing, search and replace with regex, Git and merge conflicts, the integrated terminal, debugging with launch.json, tasks, snippets, profiles, remote development (SSH, containers, WSL), AI features and the best extensions by language. Written for developers who use Visual Studio Code every day and want to work faster without trying every setting.
Last reviewed: December 2026 (VS Code 1.148). Shortcuts are the defaults; yours may differ if you changed keybindings or installed a keymap extension. Check any shortcut with Help > Keyboard Shortcuts Reference or the Keyboard Shortcuts editor (
Ctrl+K Ctrl+S, macOSCmd+K Cmd+S).
Table of Contents
- The 10 tips that matter most
- Essential keyboard shortcuts
- Multi-cursor and selection
- Navigate code fast
- Search and replace like a pro
- Recommended settings.json
- Settings explained
- Workspace settings and sharing with your team
- Integrated terminal
- Git in VS Code
- Debugging
- Tasks
- Snippets
- Profiles and Settings Sync
- Remote development
- AI features
- Best extensions by category
- The code command line
- Performance and troubleshooting
- Hidden gems
- FAQ
- Where to go next
- Contributing
- More free resources
The 10 tips that matter most
If you only learn ten things, learn these:
- Command Palette:
Ctrl+Shift+P(macOSCmd+Shift+P). Every feature is here; type a few letters of what you want. - Quick Open:
Ctrl+P(Cmd+P). Type part of a file name to open it. Add:42to jump to line 42,@for symbols,#for workspace symbols. - Add next occurrence:
Ctrl+D(Cmd+D). Press repeatedly to edit every match of a word at once. - Go to definition / references:
F12andShift+F12. Rename everywhere withF2. - Move and copy lines:
Alt+Up/Down(Option+Up/Down) moves; addShiftto copy. - Toggle terminal:
Ctrl+`(both platforms). - Quick Fix:
Ctrl+.(Cmd+.) for imports, fixes and refactors offered by the language server. - Format on save: set
"editor.formatOnSave": trueand a default formatter per language. - Search across files:
Ctrl+Shift+F(Cmd+Shift+F) with regex and include/exclude globs. - Zen mode and splits:
Ctrl+K Zto focus,Ctrl+\(Cmd+\) to split the editor.
Essential keyboard shortcuts
Windows and Linux share most shortcuts. Where Linux differs, it is noted below the table.
General
| Action | Windows / Linux | macOS |
|---|---|---|
| Command Palette | Ctrl+Shift+P or F1 |
Cmd+Shift+P or F1 |
| Quick Open file | Ctrl+P |
Cmd+P |
| Settings | Ctrl+, |
Cmd+, |
| Keyboard Shortcuts editor | Ctrl+K Ctrl+S |
Cmd+K Cmd+S |
| Toggle Primary Side Bar | Ctrl+B |
Cmd+B |
| Toggle Panel (terminal, problems, output) | Ctrl+J |
Cmd+J |
| Toggle terminal | Ctrl+` |
Ctrl+` |
| New terminal | Ctrl+Shift+` |
Ctrl+Shift+` |
| Explorer / Search / Source Control | Ctrl+Shift+E / Ctrl+Shift+F / Ctrl+Shift+G |
Cmd+Shift+E / Cmd+Shift+F / Ctrl+Shift+G |
| Run and Debug / Extensions | Ctrl+Shift+D / Ctrl+Shift+X |
Cmd+Shift+D / Cmd+Shift+X |
| Problems | Ctrl+Shift+M |
Cmd+Shift+M |
Zen mode (press Esc twice to leave) |
Ctrl+K Z |
Cmd+K Z |
| Zoom in / out | Ctrl+= / Ctrl+- |
Cmd+= / Cmd+- |
Editing
| Action | Windows / Linux | macOS |
|---|---|---|
| Move line up / down | Alt+Up / Alt+Down |
Option+Up / Option+Down |
| Copy line up / down | Shift+Alt+Up / Shift+Alt+Down |
Shift+Option+Up / Shift+Option+Down |
| Delete line | Ctrl+Shift+K |
Cmd+Shift+K |
| Insert line below / above | Ctrl+Enter / Ctrl+Shift+Enter |
Cmd+Enter / Cmd+Shift+Enter |
| Toggle line comment | Ctrl+/ |
Cmd+/ |
| Toggle block comment | Shift+Alt+A |
Shift+Option+A |
| Format document | Shift+Alt+F |
Shift+Option+F |
| Format selection | Ctrl+K Ctrl+F |
Cmd+K Cmd+F |
| Quick Fix / refactor | Ctrl+. |
Cmd+. |
| Trigger suggestions | Ctrl+Space |
Ctrl+Space |
| Rename symbol | F2 |
F2 |
| Indent / outdent line | Ctrl+] / Ctrl+[ |
Cmd+] / Cmd+[ |
| Toggle word wrap | Alt+Z |
Option+Z |
| Fold / unfold region | Ctrl+Shift+[ / Ctrl+Shift+] |
Option+Cmd+[ / Option+Cmd+] |
| Fold all / unfold all | Ctrl+K Ctrl+0 / Ctrl+K Ctrl+J |
Cmd+K Cmd+0 / Cmd+K Cmd+J |
| Undo cursor position | Ctrl+U |
Cmd+U |
Editors and windows
| Action | Windows / Linux | macOS |
|---|---|---|
| Split editor | Ctrl+\ |
Cmd+\ |
| Focus editor group 1 / 2 / 3 | Ctrl+1 / Ctrl+2 / Ctrl+3 |
Cmd+1 / Cmd+2 / Cmd+3 |
| Next / previous editor | Ctrl+PageDown / Ctrl+PageUp |
Option+Cmd+Right / Option+Cmd+Left |
| Switch between recent editors | Ctrl+Tab |
Ctrl+Tab |
| Close editor | Ctrl+W |
Cmd+W |
| Reopen closed editor | Ctrl+Shift+T |
Cmd+Shift+T |
| Keep a preview editor open | Ctrl+K Enter |
Cmd+K Enter |
| Markdown preview / preview to the side | Ctrl+Shift+V / Ctrl+K V |
Cmd+Shift+V / Cmd+K V |
| New window | Ctrl+Shift+N |
Cmd+Shift+N |
Linux differences (defaults chosen to avoid desktop shortcut conflicts): copy line down is Ctrl+Shift+Alt+Down, toggle block comment is Ctrl+Shift+A, format document is Ctrl+Shift+I, peek definition is Ctrl+Shift+F10, navigate back is Ctrl+Alt+-.
Printable PDFs for each platform are under Help > Keyboard Shortcuts Reference, or on the keyboard shortcuts docs page.
Multi-cursor and selection
| Action | Windows / Linux | macOS |
|---|---|---|
| Add cursor at click | Alt+Click |
Option+Click |
| Add cursor above / below | Ctrl+Alt+Up / Ctrl+Alt+Down |
Option+Cmd+Up / Option+Cmd+Down |
| Add next occurrence of selection | Ctrl+D |
Cmd+D |
| Skip this occurrence | Ctrl+K Ctrl+D |
Cmd+K Cmd+D |
| Select all occurrences of selection | Ctrl+Shift+L |
Cmd+Shift+L |
| Select all occurrences of the current word | Ctrl+F2 |
Cmd+F2 |
| Cursors at the end of every selected line | Shift+Alt+I |
Shift+Option+I |
| Column (box) selection | Shift+Alt+Drag |
Shift+Option+Drag |
| Expand / shrink selection | Shift+Alt+Right / Shift+Alt+Left |
Ctrl+Shift+Cmd+Right / Ctrl+Shift+Cmd+Left |
| Select current line | Ctrl+L |
Cmd+L |
Example: turn a list into a JavaScript array. Select the lines, press Shift+Alt+I to put a cursor at each line end, press Home to jump to the start, type ', press End, type ',. Done in five keystrokes.
Example: rename a variable in one function only. Select the name, press Ctrl+D until all occurrences in the function are selected (Ctrl+K Ctrl+D to skip ones you do not want), type the new name. For a true rename across files, use F2 instead.
If you prefer Ctrl+Click (or Cmd+Click) to add cursors, set "editor.multiCursorModifier": "ctrlCmd"; then Alt+Click opens definitions to the side.
Navigate code fast
| Action | Windows / Linux | macOS |
|---|---|---|
| Go to file | Ctrl+P |
Cmd+P |
| Go to line | Ctrl+G |
Ctrl+G |
| Go to symbol in file | Ctrl+Shift+O (type : to group by kind) |
Cmd+Shift+O |
| Go to symbol in workspace | Ctrl+T |
Cmd+T |
| Go to definition / open to the side | F12 / Ctrl+K F12 |
F12 / Cmd+K F12 |
| Peek definition (inline) | Alt+F12 |
Option+F12 |
| Go to references | Shift+F12 |
Shift+F12 |
| Go to implementation | Ctrl+F12 |
Cmd+F12 |
| Navigate back / forward | Alt+Left / Alt+Right |
Ctrl+- / Ctrl+Shift+- |
| Go to bracket | Ctrl+Shift+\ |
Cmd+Shift+\ |
| Next / previous problem | F8 / Shift+F8 |
F8 / Shift+F8 |
| Next / previous change (Git) | Alt+F3 / Shift+Alt+F3 |
Option+F3 / Shift+Option+F3 |
| Show hover | Ctrl+K Ctrl+I |
Cmd+K Cmd+I |
| Breadcrumbs focus | Ctrl+Shift+. |
Cmd+Shift+. |
Quick Open prefixes: type ? in Quick Open to see them all. Common ones: > commands, @ symbols in the file, # symbols in the workspace, : go to line, % text search (quick search), term open terminals, task run tasks, debug launch configurations, ext manage extensions.
Search and replace like a pro
In the Search view (Ctrl+Shift+F):
- Toggle match case (
Alt+C), whole word (Alt+W) and regex (Alt+R) with the buttons or shortcuts. - Click
...to show files to include / exclude and use globs:src/**/*.ts,!**/*.test.ts,{docs,examples}/**. - Replace with capture groups when regex is on:
| Find (regex) | Replace | Result |
|---|---|---|
console\.log\((.*)\);? |
logger.debug($1); |
Swap logging calls |
(\w+)\s*=\s*require\('([^']+)'\) |
import $1 from '$2' |
CommonJS to ESM imports |
"(\w+)": |
$1: |
Unquote JSON-style object keys |
^(\s*)//\s*TODO |
$1// FIXME |
Preserve indentation with $1 |
\bcolour\b |
color |
Whole-word fix |
Case-changing replacements: \u$1 (uppercase first letter), \U$1 (whole group upper), \l and \L for lowercase.
- Use Open in Editor in the Search view to get all results in an editable file-like view (Search Editor) that you can save and rerun.
- Exclude generated folders globally with
search.exclude(see settings below). - In the current file,
Ctrl+H(macOSCmd+Option+F) opens replace;Alt+Enterselects all matches as cursors.
Recommended settings.json
Open it with Command Palette > Preferences: Open User Settings (JSON). These are sensible defaults for most developers; delete what you disagree with.
{
// Editor basics
"editor.fontSize": 14,
"editor.lineHeight": 1.6,
"editor.fontLigatures": true,
"editor.tabSize": 2,
"editor.rulers": [100],
"editor.wordWrap": "off",
"editor.renderWhitespace": "boundary",
"editor.minimap.enabled": false,
"editor.stickyScroll.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.linkedEditing": true,
"editor.cursorSmoothCaretAnimation": "on",
"editor.smoothScrolling": true,
"editor.inlayHints.enabled": "onUnlessPressed",
"editor.suggest.preview": true,
"editor.acceptSuggestionOnEnter": "smart",
// Formatting and fixes on save
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"[javascript][typescript][javascriptreact][typescriptreact][json][jsonc][css][markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.tabSize": 4
},
// Files
"files.autoSave": "onFocusChange",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.eol": "\n",
"files.exclude": {
"**/.DS_Store": true,
"**/__pycache__": true
},
// Explorer and workbench
"explorer.compactFolders": false,
"explorer.confirmDragAndDrop": false,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, .npmrc",
"*.ts": "${capture}.test.ts, ${capture}.spec.ts, ${capture}.d.ts",
"tsconfig.json": "tsconfig.*.json"
},
"workbench.editor.enablePreview": true,
"workbench.startupEditor": "none",
"breadcrumbs.enabled": true,
// Search
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/build": true,
"**/.venv": true,
"**/*.min.js": true
},
"search.useIgnoreFiles": true,
// Terminal
"terminal.integrated.fontSize": 13,
"terminal.integrated.scrollback": 10000,
"terminal.integrated.stickyScroll.enabled": true,
"terminal.integrated.enablePersistentSessions": true,
// Git
"git.autofetch": true,
"git.confirmSync": false,
"git.pruneOnFetch": true,
"git.blame.editorDecoration.enabled": false,
"diffEditor.ignoreTrimWhitespace": false,
"merge-conflict.autoNavigateNextConflict.enabled": true,
// Privacy
"telemetry.telemetryLevel": "off"
}
settings.json accepts comments and trailing commas (it is JSONC). Language-specific blocks like "[python]" override global values; several languages can share one block as shown.
Settings explained
| Setting | What it does | Why you might want it |
|---|---|---|
editor.stickyScroll.enabled |
Pins the current class/function headers at the top while scrolling | Always know where you are in long files |
editor.linkedEditing |
Renames the matching HTML/JSX tag as you type | Saves edits in markup |
editor.guides.bracketPairs |
Draws guides between matching brackets | Easier to read nested code (bracket pair colors are on by default) |
editor.inlayHints.enabled |
Shows inferred types and parameter names inline | onUnlessPressed hides them while holding Ctrl+Alt (Ctrl+Option on macOS) |
editor.codeActionsOnSave |
Runs fixes on save | "explicit" runs on manual save, not auto-save |
files.autoSave |
Saves automatically | onFocusChange saves when you switch away; afterDelay saves constantly |
explorer.fileNesting.* |
Groups related files under a parent | Cleaner Explorer for lockfiles, tests, generated files |
workbench.editor.enablePreview |
Single-clicked files open in a reusable italic tab | Set to false if tabs keep “disappearing” |
search.exclude |
Hides folders from search results | Faster, relevant results |
git.autofetch |
Fetches from remotes periodically | See incoming changes in the status bar |
git.blame.editorDecoration.enabled |
Shows inline Git blame on the current line | Turn on if you want blame without an extension |
telemetry.telemetryLevel |
Controls usage data | off, crash, error or all |
Find any setting quickly: in the Settings UI, search filters like @modified, @ext:esbenp.prettier-vscode and @lang:python narrow the list.
Workspace settings and sharing with your team
Commit a .vscode folder so everyone gets the same experience:
.vscode/
├── settings.json # project settings (override user settings)
├── extensions.json # recommended extensions (prompted on open)
├── launch.json # debug configurations
└── tasks.json # build/test tasks
// .vscode/extensions.json
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "editorconfig.editorconfig"],
"unwantedRecommendations": []
}
Keep personal preferences (font, theme, minimap) in user settings and only project rules (formatter, tab size, excluded folders) in workspace settings. Pair it with an .editorconfig file so other editors follow the same basics.
Integrated terminal
| Action | Windows / Linux | macOS |
|---|---|---|
| Toggle terminal | Ctrl+` |
Ctrl+` |
| New terminal | Ctrl+Shift+` |
Ctrl+Shift+` |
| Split terminal | Ctrl+Shift+5 |
Cmd+\ (when the terminal has focus) |
| Scroll to previous / next command | Ctrl+Up / Ctrl+Down |
Cmd+Up / Cmd+Down |
| Clear | (run clear) |
Cmd+K |
| Maximize the panel | Command Palette > “View: Toggle Maximized Panel” | same |
Tips:
- Shell integration (on by default for bash, zsh, fish and PowerShell) adds command decorations (blue/red dots for success/failure), “run recent command” (Command Palette > Terminal: Run Recent Command) and better links. Hover a decoration to rerun or copy output.
- Ctrl+Click (Cmd+Click) on file paths with line numbers in terminal output, like
src/app.ts:42:7, opens the file at that position. - Choose the default shell with Terminal: Select Default Profile.
- Move a terminal into the editor area (Terminal: Move Terminal into Editor Area) to see it beside code.
- Name and color terminals from the right-click menu when you run several (server, tests, logs).
Git in VS Code
- Stage parts of a file: open the diff from Source Control, select lines and use Stage Selected Ranges (or the
+in the gutter on a change). - Quick diff in the gutter: click the colored bar next to line numbers to see and revert one change.
- Commit with
Ctrl+Enter(Cmd+Enter) in the commit message box. - 3-way merge editor: open a file with conflicts and click Resolve in Merge Editor for Incoming / Current / Result panes.
- Timeline view (bottom of Explorer) shows Git history and local save history for the current file, so you can restore a version even if you never committed it.
- Compare any two files: select both in Explorer, right-click > Compare Selected.
- Branches: click the branch name in the status bar to switch or create one.
- Use VS Code as your Git editor:
git config --global core.editor "code --wait", plusdiff.tool/merge.toolset tocode --wait --diff/code --wait --mergeif you like.
Debugging
Press F5 to start. If there is no configuration, VS Code offers templates. A launch.json with common setups:
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Node: current file",
"type": "node",
"request": "launch",
"program": "${file}",
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Node: attach to process (port 9229)",
"type": "node",
"request": "attach",
"port": 9229
},
{
"name": "Python: current file",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Chrome: localhost:3000",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
| Action | Windows / Linux | macOS |
|---|---|---|
| Start / continue | F5 |
F5 |
| Run without debugging | Ctrl+F5 |
Ctrl+F5 |
| Stop | Shift+F5 |
Shift+F5 |
| Toggle breakpoint | F9 |
F9 |
| Step over / into / out | F10 / F11 / Shift+F11 |
F10 / F11 / Shift+F11 |
Breakpoint superpowers (right-click the gutter):
- Conditional breakpoint: stop only when
user.id === 42. - Hit count: stop on the 10th time.
- Logpoint: print
Order {order.id} total {order.total}without stopping or editing code. - Triggered breakpoint: enabled only after another breakpoint is hit.
The JavaScript Debug Terminal (from the terminal dropdown) debugs any Node.js process you start from it, including npm run scripts and test runners, with no configuration.
Tasks
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "test",
"type": "shell",
"command": "npm test",
"group": { "kind": "test", "isDefault": true },
"problemMatcher": []
},
{
"label": "build",
"type": "shell",
"command": "npm run build",
"group": { "kind": "build", "isDefault": true },
"problemMatcher": ["$tsc"]
}
]
}
Run the default build task with Ctrl+Shift+B (Cmd+Shift+B); run any task with Command Palette > Tasks: Run Task. Problem matchers turn compiler output into clickable entries in the Problems panel. Add "preLaunchTask": "build" to a launch configuration to build before debugging.
Snippets
Create your own with Command Palette > Snippets: Configure Snippets (global, per language, or per project in .vscode/*.code-snippets):
// .vscode/project.code-snippets
{
"React component": {
"scope": "typescriptreact",
"prefix": "rfc",
"body": [
"export function ${1:${TM_FILENAME_BASE}}({ ${2:props} }: ${1}Props) {",
" return <div>$0</div>",
"}"
],
"description": "React function component"
},
"Console log variable": {
"scope": "javascript,typescript",
"prefix": "clv",
"body": ["console.log('${1:value}:', ${1});"]
}
}
Placeholders: $1, $2 are tab stops, ${1:default} has a default, $0 is the final cursor, and variables such as TM_FILENAME_BASE, CURRENT_YEAR and CLIPBOARD insert context. Emmet is built in for HTML/CSS/JSX: type ul>li.item*3 and press Tab.
Profiles and Settings Sync
- Profiles (gear icon > Profiles) are separate sets of settings, extensions, keybindings and UI state. Create one per stack (Web, Python, Writing, Presentation) so each loads only the extensions it needs. Share a profile as a GitHub gist or a file.
- Settings Sync (gear icon > Backup and Sync Settings) syncs settings, keybindings, snippets, extensions and profiles across machines using a Microsoft or GitHub account. Choose what to sync and exclude machine-specific settings with
settingsSync.ignoredSettings. - Open a temporary clean setup to test whether a problem comes from your configuration:
code --profile "Temp"or Command Palette > Profiles: Create a Temporary Profile.
Remote development
| Extension | Lets you | Typical use |
|---|---|---|
| Remote - SSH | Open folders on any SSH host; extensions run on the server | Cloud VMs, powerful build machines |
| Dev Containers | Develop inside a container defined by .devcontainer/devcontainer.json |
Reproducible team environments |
| WSL | Use the Linux toolchain on Windows | Windows developers targeting Linux |
Remote Tunnels (built in, code tunnel) |
Reach a machine through a secure tunnel, also from vscode.dev in a browser | Access your desktop from anywhere without SSH setup |
Minimal dev container:
// .devcontainer/devcontainer.json
{
"name": "Node 22",
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
"customizations": {
"vscode": { "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] }
},
"forwardPorts": [3000],
"postCreateCommand": "npm install"
}
Use Ports in the panel to forward and share local ports (for example, to test a dev server from your phone). Learn more in the remote development docs.
AI features
VS Code includes AI chat, agents and inline suggestions through GitHub Copilot, with a free tier for eligible accounts. To set up, hover the Copilot icon in the status bar and choose Use AI Features, then sign in.
| Feature | How to use | Good for |
|---|---|---|
| Inline suggestions | Type; Tab accepts, Esc dismisses, Ctrl+Right (Cmd+Right) accepts word by word |
Boilerplate, repetitive code |
| Chat view | Ctrl+Alt+I (macOS Ctrl+Cmd+I) |
Questions about your codebase, explanations |
| Inline chat | Ctrl+I (macOS Cmd+I) in the editor or terminal |
Edit the selected code in place, generate a command |
| Agents | Choose an agent in the Chat view and describe a task | Multi-file changes, running tests and fixing failures |
| Context | #file, #selection, @workspace-style references and drag-and-drop in chat |
Pointing the model at the right code |
Customize behavior per project:
- Instructions files:
.github/copilot-instructions.mdorAGENTS.mdat the repository root, and scoped.github/instructions/<name>.instructions.mdfiles with anapplyToglob in their front matter. Put coding conventions, commands and architecture notes here. - MCP servers: add tools (browsers, databases, issue trackers) with Model Context Protocol servers. The current workspace format is a
.mcp.jsonfile at the workspace root with a top-levelmcpServersobject:
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
}
- Turn AI features off: set
"chat.disableAIFeatures": truein user settings (everywhere) or workspace settings (one project).
AI features change monthly; check the Copilot in VS Code docs and the release notes for the current details. Review generated code like any other code, and do not paste secrets into prompts.
Best extensions by category
All IDs below were checked on the Visual Studio Marketplace. Install from the Extensions view or with code --install-extension <id>. Fewer, well-chosen extensions keep VS Code fast.
Must-haves for most developers
| Extension | ID | Why |
|---|---|---|
| ESLint | dbaeumer.vscode-eslint |
JavaScript/TypeScript linting in the editor |
| Prettier | esbenp.prettier-vscode |
Opinionated formatter for web languages |
| EditorConfig | EditorConfig.EditorConfig |
Shared indentation and line-ending rules |
| Error Lens | usernamehw.errorlens |
Shows diagnostics inline at the end of the line |
| Code Spell Checker | streetsidesoftware.code-spell-checker |
Catches typos in code and comments |
| GitLens | eamodio.gitlens |
Rich blame, history and repository insights |
| Git Graph | mhutchie.git-graph |
Visual commit graph |
| GitHub Pull Requests | GitHub.vscode-pull-request-github |
Review and manage PRs and issues inside VS Code |
By language and framework
| Stack | Extension | ID |
|---|---|---|
| Python | Python, Pylance, Ruff | ms-python.python, ms-python.vscode-pylance, charliermarsh.ruff |
| Jupyter notebooks | Jupyter | ms-toolsai.jupyter |
| Go | Go | golang.go |
| Rust | rust-analyzer | rust-lang.rust-analyzer |
| C / C++ | C/C++ | ms-vscode.cpptools |
| Vue | Vue (Official) | Vue.volar |
| Svelte | Svelte for VS Code | svelte.svelte-vscode |
| Tailwind CSS | Tailwind CSS IntelliSense | bradlc.vscode-tailwindcss |
| Flutter / Dart | Flutter | Dart-Code.flutter |
| YAML (Kubernetes, CI) | YAML | redhat.vscode-yaml |
| TOML | Even Better TOML | tamasfe.even-better-toml |
| Terraform | HashiCorp Terraform | hashicorp.terraform |
| Containers | Container Tools | ms-azuretools.vscode-containers |
Testing, APIs and writing
| Extension | ID | Why |
|---|---|---|
| Playwright Test | ms-playwright.playwright |
Run, debug and record end-to-end tests |
| Vitest | vitest.explorer |
Vitest in the Testing view |
| REST Client | humao.rest-client |
Send HTTP requests from .http files and keep them in Git |
| Markdown All in One | yzhang.markdown-all-in-one |
Shortcuts, table of contents, list editing |
| Live Preview | ms-vscode.live-server |
Local server with live reload for static HTML |
| Todo Tree | Gruntfuggly.todo-tree |
Collects TODO/FIXME comments in a tree |
Keymaps and look
| Extension | ID | Why |
|---|---|---|
| Vim | vscodevim.vim |
Vim keybindings |
| Material Icon Theme | PKief.material-icon-theme |
Clear file and folder icons |
Coming from another editor? Search the Marketplace for “keymap” (official keymaps exist for several popular editors) to keep your muscle memory.
Best picks by situation
- New to VS Code: ESLint + Prettier (web) or Python + Ruff, Error Lens, GitLens. Stop there for a week.
- Team project: EditorConfig plus an
.vscode/extensions.jsonwith the formatter and linter the CI uses. - Remote or container work: Remote - SSH and Dev Containers.
- Performance problems: disable extensions you do not use per workspace (right-click > Disable (Workspace)) or use profiles.
The code command line
Install the code command on macOS via Command Palette > Shell Command: Install ‘code’ command in PATH (Windows and Linux installers add it automatically).
| Task | Command |
|---|---|
| Open the current folder | code . |
| Open a file at a line and column | code -g src/app.ts:42:7 |
| Reuse the current window | code -r file.txt |
| Open a new window | code -n |
| Compare two files | code --diff old.json new.json |
| Use as Git editor (waits for close) | code --wait |
| List / install / uninstall extensions | code --list-extensions, code --install-extension <id>, code --uninstall-extension <id> |
| Back up your extension list | code --list-extensions > extensions.txt |
| Start without extensions (troubleshooting) | code --disable-extensions |
| Open with a specific profile | code --profile "Python" |
| Start a remote tunnel | code tunnel |
| Pipe output into an editor tab | ls -la \| code - |
Performance and troubleshooting
| Problem | Try |
|---|---|
| VS Code is slow or uses a lot of CPU | Help > Open Process Explorer to find the culprit; Developer: Show Running Extensions shows activation times |
| Not sure if an extension causes it | Help > Start Extension Bisect finds the bad extension by disabling half at a time |
| File watcher limits on Linux (“Visual Studio Code is unable to watch for file changes”) | Exclude large folders with files.watcherExclude, or raise fs.inotify.max_user_watches |
| Language features stop working | Command Palette > Developer: Reload Window; check the language server’s Output channel |
| TypeScript uses the wrong version | TypeScript: Select TypeScript Version > Use Workspace Version |
| Python interpreter is wrong | Python: Select Interpreter (choose the project’s .venv) |
| Settings seem ignored | A workspace or language-specific setting overrides it; search @modified in Settings |
| Something broke after an update | Test with code --disable-extensions or a temporary profile |
Hidden gems
- Sticky scroll in the editor and terminal keeps context visible (enabled in the settings above).
- Local History: VS Code keeps recent versions of saved files; restore them from the Timeline view even without Git.
- Command Palette > “Toggle Screencast Mode” shows keystrokes on screen for demos and recordings.
Ctrl+K M(Cmd+K M) changes the language mode of the current file.- Transform text: Command Palette > “Transform to Uppercase / Lowercase / Title Case / Snake Case”.
- Sort lines: select lines, Command Palette > “Sort Lines Ascending”.
- Copy relative path: right-click a file tab or Explorer item > Copy Relative Path.
- Drag a file into a Markdown file while holding
Shiftto insert a relative link (images become image links). - Multi-root workspaces (File > Add Folder to Workspace) put a frontend and backend repository side by side with separate settings.
- Accessibility: Help > Get Started with Accessibility Features, accessible view (
Alt+F2) and audio cues for errors, breakpoints and more. - vscode.dev runs VS Code in the browser; press
.on a GitHub repository page to open it in the web editor.
FAQ
What is the difference between VS Code and Visual Studio? VS Code is a lightweight, cross-platform code editor extended through extensions. Visual Studio is a full IDE for Windows (with a separate Mac history) focused on .NET and C++ with built-in designers and profilers.
Where is settings.json?
User settings: Command Palette > Preferences: Open User Settings (JSON). Workspace settings live in .vscode/settings.json in the project.
How do I make Prettier format on save?
Install the Prettier extension, set "editor.defaultFormatter": "esbenp.prettier-vscode" (globally or per language) and "editor.formatOnSave": true. If nothing happens, check the Prettier output channel and whether another formatter is set for that language.
How do I reset VS Code to defaults?
Create a new empty profile, or start with code --profile "Clean". Your original profile and settings remain untouched.
Why does my tab disappear when I open another file?
It was a preview tab (italic title). Double-click the file or start editing to keep it, or set "workbench.editor.enablePreview": false.
How do I open the same file twice side by side?
Ctrl+\ (Cmd+\) splits the editor with the same file in both groups; changes are shared.
Can I use VS Code without AI features?
Yes. Set "chat.disableAIFeatures": true to hide chat and inline suggestions.
How do I sync settings across computers?
Turn on Backup and Sync Settings from the gear menu and sign in. Or keep settings.json and your extension list in a dotfiles repository.
What font should I use?
Any monospaced font with clear distinction between 0/O and 1/l/I. Popular free choices include Fira Code, JetBrains Mono and Cascadia Code (all support ligatures).
Where to go next
- Work through the official Tips and Tricks page and the default keybindings reference.
- Learn debugging and tasks properly; they save more time than any extension.
- Set up profiles and Settings Sync.
- Try Dev Containers for reproducible environments.
- Read the Copilot in VS Code docs if you use AI features.
- Skim the monthly release notes; most months add something useful.
Contributing
PRs are welcome. Keep entries accurate: test shortcuts on the platform you document (and say which), use real Marketplace extension IDs, and link to the official docs for anything that changes often, such as AI features.
If this helped you, a star helps others find it.
More free resources
Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.