01 Download and install
VS Code is free, and it is the same program on Windows, Mac and Linux. Get it from code.visualstudio.com — the site detects your operating system and offers the right build.
Accept the defaults during installation, with one exception on Windows: tick Add to PATH if you are offered it. That is what lets you open a folder from the terminal later.
Download it from that address and nowhere else. Search results for “vs code download” carry paid-ad impostors that bundle other software.
02 Open a folder, not a file
This is the habit that separates a smooth year from a frustrating one. VS Code works on a folder — it calls it a workspace. Open the folder your project lives in, and the sidebar becomes your project.
Open a single loose file instead and half the features have nothing to work with: no file tree, no project-wide search, and the terminal starts in the wrong place.
the habit
File > Open Folder... <- do this
File > Open File... <- not this
Your folder should look like:
my-project/
|- index.html
|- style.css
+- script.js
03 The settings we use
Open settings with Ctrl+, (⌘+, on a Mac) and search for each name in the table.
Auto Save is the one to turn on first. Nearly every “my change did not appear” problem is an unsaved file, and the dot in the tab is easy to miss.
04 Settings as a file
Every setting is really a line in a JSON file, and pasting the file is faster than clicking through eight searches.
Open the command palette with Ctrl+Shift+P, type settings json, and choose Preferences: Open User Settings (JSON). Paste this inside the outer braces.
If the file already has entries, add a comma after the last one before pasting.
settings.json
{
"files.autoSave": "afterDelay",
"editor.fontSize": 15,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.wordWrap": "on",
"editor.renderWhitespace": "boundary",
"editor.formatOnSave": true,
"editor.bracketPairColorization.enabled": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
}
05 Pick a theme
Themes are personal and they are not just decoration: a theme with poor contrast makes you miss typos. Try a few and keep the one where strings, numbers and comments are obviously different colours.
Press Ctrl+K then Ctrl+T to flick through them with the arrow keys — the editor previews each one as you move.
built in, nothing to install
06 Extensions worth having
Open the extensions panel with Ctrl+Shift+X and search by name. Install these four and stop there — every extension slows startup, and a long list is mostly things you installed once and forgot.
Check the publisher before you install. Popular extensions have look-alikes with almost the same name and a few hundred downloads.
07 Prove the setup works
Do not wait until an assignment is due to discover something did not install. Run through this now.
The integrated terminal opens with Ctrl+` — the backtick key, above Tab on most keyboards. It starts in whatever folder you have open, which is the other reason to open folders rather than files.
08 When something is wrong
Four problems account for most of what goes wrong in the first week.
Nothing on this page mentions that. Try a shorter word, or clear the filter.