VS Code Setup Guide¶
Visual Studio Code (VS Code) is a free, powerful, and extensible code editor that we use in the lab for development work. This guide will walk you through installing and configuring VS Code.
Installation¶
Windows¶
- Download VS Code
- Visit https://code.visualstudio.com/
- Click the "Download for Windows" button
-
Run the downloaded installer (
VSCodeUserSetup-{version}.exe) -
Installation Options
- ✅ Check "Add to PATH" (important for command-line usage)
- ✅ Check "Create a desktop icon" (optional but convenient)
- ✅ Check "Register Code as an editor for supported file types"
-
✅ Check "Add 'Open with Code' action to context menu"
-
Complete Installation
- Click "Install" and wait for the installation to complete
- Launch VS Code
macOS¶
- Download VS Code
- Visit https://code.visualstudio.com/
- Click "Download for Mac"
-
Open the downloaded
.zipfile -
Install
- Drag
Visual Studio Code.appto the Applications folder -
Launch VS Code from Applications or Spotlight
-
Add to PATH (for command-line usage)
- Open VS Code
- Press Cmd+Shift+P to open the Command Palette
- Type "shell command" and select "Shell Command: Install 'code' command in PATH"
Initial Configuration¶
Basic Settings¶
- Open Settings
- Go to
File→Preferences→Settings(orCode→Preferences→Settingson macOS) -
Or press Ctrl+, (Windows/Linux) or Cmd+, (macOS)
-
Recommended Settings
Search for and configure these settings:
- Auto Save: Search for "Auto Save" and set to
afterDelay - Tab Size: Search for "Tab Size" and set to
4(or2for web development) - Format On Save: Search for "Format On Save" and enable it
- Trim Trailing Whitespace: Search for "Trim Trailing Whitespace" and enable it
- Files: Insert Final Newline: Enable to ensure files end with a newline
Font and Appearance¶
- Font Settings
- Search for "Font Family" and set your preferred monospace font
- Popular options:
'Fira Code', 'Consolas', 'Monaco', 'Courier New' -
For ligatures with Fira Code, enable "Font Ligatures"
-
Theme
- Press Ctrl+K Ctrl+T (Windows/Linux) or Cmd+K Cmd+T (macOS)
- Choose a color theme (popular: Dark+, Monokai, Dracula)
Terminal Configuration¶
- Integrated Terminal
- Open terminal:
Ctrl+`(backtick) -
Configure default shell in Settings under "Terminal > Integrated > Default Profile"
-
Windows Users: Consider setting up Windows Terminal or Git Bash for a better terminal experience
Keyboard Shortcuts¶
Learn these essential keyboard shortcuts:
Universal¶
- Ctrl+P / Cmd+P: Quick file open
- Ctrl+Shift+P / Cmd+Shift+P: Command palette
- Ctrl+B / Cmd+B: Toggle sidebar
- Ctrl+` / Cmd+`: Toggle terminal
- Ctrl+/ / Cmd+/: Toggle line comment
Editing¶
- Alt+Up / Alt+Down: Move line up/down
- Shift+Alt+Up / Shift+Alt+Down: Copy line up/down
- Ctrl+D / Cmd+D: Add selection to next find match
- Ctrl+Shift+L / Cmd+Shift+L: Select all occurrences of current selection
Navigation¶
- Ctrl+Tab: Switch between open files
- F12: Go to definition
- Alt+Left / Alt+Right: Navigate back/forward
Settings Sync¶
Enable Settings Sync to keep your configuration across devices:
- Click the gear icon (⚙️) in the bottom-left corner
- Select "Turn on Settings Sync"
- Sign in with GitHub or Microsoft account
- Choose what to sync (settings, extensions, keybindings, etc.)
Next Steps¶
- Install Required Extensions
- Set up Remote Development on OSC
- Configure your OSC SSH Connection
Troubleshooting¶
VS Code won't launch¶
- Windows: Try running the installer as administrator
- macOS: Check that the app is in the Applications folder
- Linux: Verify the installation with
code --version
Extensions not installing¶
- Check your internet connection
- Try disabling your firewall temporarily
- Reload VS Code: Press Ctrl+Shift+P and run "Developer: Reload Window"
More Issues?¶
See the Troubleshooting Guide or visit VS Code Documentation