VS Code Setup
How to install VS Code and set it up for productive development
VS Code is a free code editor from Microsoft that works on every platform. It's lightweight, fast, and has a massive extension ecosystem. This guide covers installing it, setting up the essentials, and getting productive quickly.
Installing
- Open Terminal and run:
If you don't have Homebrew, download VS Code directly and drag it to Applicationsbrew install --cask visual-studio-code
Setting up the code command
The code command lets you open files and folders from the terminal. On macOS, you need to install it manually.
- Open VS Code
- Press Cmd + Shift + P to open the Command Palette
- Type
shell commandand select Shell Command: Install 'code' command in PATH - Restart your terminal
Now you can run code . to open the current folder, or code myfile.py to open a specific file.
Essential extensions
Open the Extensions panel with Cmd + Shift + X and install these based on what you work with:
General:
- GitLens – enhanced git blame, history, and line annotations
- GitHub Copilot – AI code suggestions (requires GitHub subscription)
- Error Lens – shows errors and warnings inline next to the code
JavaScript / TypeScript:
- ESLint – catches bugs and enforces code style
- Prettier – auto-formats your code on save
Python:
- Python (Microsoft) – core Python support, debugging, and virtual environments
- Pylance – fast type checking and autocomplete for Python
Remote work:
- Remote - SSH – edit files on a remote server as if they were local
Settings to configure
Open settings with Cmd + , or go to Code > Settings > Settings. Search for these:
- Auto Save – set to
afterDelayso you never lose work - Format On Save – turn this on. Combined with Prettier or a formatter, your code stays clean automatically
- Tab Size – set to
2for JS/TS or4for Python (or whatever your team uses) - Theme – search
color themeto pick one. Popular choices: One Dark Pro, GitHub Theme, Catppuccin
Settings Sync
Sync your extensions, settings, keybindings, and snippets across machines.
- Click the account icon in the bottom-left corner
- Click Turn on Settings Sync
- Sign in with GitHub or Microsoft
- Choose what to sync (extensions, settings, keybindings, snippets, UI state)
When you set up VS Code on another machine, sign in the same way and everything carries over.
Terminal integration
VS Code has a built-in terminal so you don't need to switch windows.
- Open it with Ctrl + ` (backtick)
- To change the default shell, press Cmd + Shift + P and search for Terminal: Select Default Profile
- Pick your preferred shell (zsh, bash, fish, etc.)
You can split terminals, have multiple tabs, and run tasks directly inside VS Code.
Keyboard shortcuts worth learning
- Cmd + Shift + P – Command Palette (search any action)
- Cmd + P – Quick Open (search files by name)
- Cmd + D – select the next occurrence of the current word (multi-cursor editing)
- Cmd + Shift + F – find across all files in the project
- Cmd + B – toggle the sidebar
- Cmd + / – toggle comment on the current line
- Option + Up/Down – move a line up or down
- Cmd + Shift + K – delete the current line
Workspaces
If you work on a monorepo or multiple related projects, use workspaces to open them all in one window.
- Go to File > Add Folder to Workspace for each project folder
- Save the workspace with File > Save Workspace As
- Open it anytime with File > Open Workspace from File
Each folder gets its own file tree in the sidebar, and search works across all of them.
Extensions to avoid
- Bracket Pair Colorizer – VS Code has this built in and enabled by default since late 2022
- Path Intellisense – built into VS Code for most cases
- Auto Close Tag / Auto Rename Tag – built into VS Code for HTML and JSX
- Any extension that hasn't been updated in over a year – check the "Last Updated" date in the extension details
Frequently Asked Questions
Is VS Code the same as Visual Studio?▾
No. Visual Studio is a full IDE primarily for .NET and C++ development on Windows. VS Code is a lightweight, cross-platform code editor. They share a name and a company, but they're different products.
Do I need to pay for VS Code?▾
No. VS Code is completely free and open source. Some extensions like GitHub Copilot require a separate paid subscription, but the editor itself and most extensions are free.
Should I use VS Code or a JetBrains IDE?▾
VS Code is lighter, faster to start, and more flexible through extensions. JetBrains IDEs (WebStorm, PyCharm, IntelliJ) have deeper built-in support for specific languages and frameworks. If you work in one language ecosystem, JetBrains might feel more polished out of the box. If you switch between languages or prefer a lighter tool, VS Code is the better choice.
How do I reset VS Code to default settings?▾
Open settings (Cmd + , on Mac, Ctrl + , on Windows/Linux), click the Open Settings (JSON) icon in the top right, and delete everything between the curly braces. To also reset extensions, open the Command Palette and search for Extensions: Disable All Installed Extensions, then re-enable the ones you want.
Why is VS Code using a lot of memory?▾
Usually it's extensions. Open the Command Palette (Cmd + Shift + P / Ctrl + Shift + P) and run Developer: Show Running Extensions to see which ones are using the most resources. Disable or uninstall ones you don't actively use.