Coding Hub  /  Start here

set up your editor

Install it once, configure it once, and stop fighting your tools for the rest of the year. Work through this in order the first time.

Installing

Ten minutes, once.

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.

which build
SystemWhat you want
WindowsUser Installer, 64-bit. Installs without admin rights.
MacThe .zip. Unzip it, then drag the app into Applications.
LinuxThe .deb or .rpm for your distribution.
ChromebookVS Code needs Linux turned on. Ask me before you start.

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

Settings

The ones that actually matter. Everything else is taste.

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.

search for each name
SettingSet it toWhy
Auto SaveafterDelaySaves a second after you stop typing
Font Size15 or moreYou will be reading this all year
Tab Size2What we use for HTML, CSS and JavaScript
Insert SpacesonSpaces, not tab characters
Word WraponStops long lines running off the screen
Render WhitespaceboundaryShows stray spaces that break indentation
Bracket Pair ColorizationonMatching brackets share a colour
Format On SaveonTidies indentation every time you save

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
ThemeGood for
Dark ModernThe default. A safe, high-contrast dark theme.
Light ModernBright rooms, and projecting to a screen.
Solarized LightLong sessions; low contrast, easy on the eyes.
Quiet LightLight theme with strong syntax colours.

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.

install these
ExtensionPublisherWhat it does
Live ServerRitwick DeyRight-click an HTML file, Open with Live Server. The page reloads as you save.
PrettierPrettierFormats your code on save so indentation is never the problem
Error LensAlexanderPuts the error message on the line itself instead of hiding it in a panel
PythonMicrosoftRunning and debugging Python, plus error checking as you type

Checking it worked

Two minutes.

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.

checklist

08 When something is wrong

Four problems account for most of what goes wrong in the first week.

symptom to fix
What you seeFix
The sidebar says “no folder opened”File > Open Folder, and pick your project folder
Live Server does not appear on right-clickThe extension installed but the window needs reloading: command palette, Developer: Reload Window
Your edits do not show in the browserThe file is unsaved, or the browser cached it. Save, then hard-reload with Ctrl+Shift+R
code is not recognised in the terminalVS Code is not on your PATH. Command palette, Shell Command: Install 'code' command in PATH