Lesson 11 of 40 AI & Copilot Intermediate

GitHub Copilot — Getting Started

GitHub Copilot is an AI pair programmer built directly into VS Code. In this lesson you will activate Copilot, understand how it works, and start using it for real code completion.

28% complete

1What is GitHub Copilot?

GitHub Copilot is powered by OpenAI Codex / GPT-4o and trained on billions of lines of code. It generates whole-line and multi-line code suggestions as you type. It's available as a free tier (2,000 completions/month) or Pro ($10/month, unlimited).

2Activating Copilot in VS Code

Open the Extensions view, search for GitHub Copilot, and install it. When prompted, sign in with your GitHub account. You'll see the Copilot icon in the Status Bar when it's active.

Status Bar indicators
✦ Copilot      — active and suggesting
✦ Copilot (!)  — error or not signed in
✦ ~            — paused for this file

3Using Ghost Text Completions

As you type, Copilot shows grey ghost text suggestions inline. Press Tab to accept, Esc to dismiss. Press Alt+] / Alt+[ to cycle through alternative suggestions. The more context you provide (function names, comments, types), the better the suggestions.

4Writing Better Prompts for Copilot

Copilot reads your entire file as context. You can guide it with comments:

TypeScript — comment-driven completions
// Parse a JWT token and return the payload as a typed object
// Returns null if the token is invalid or expired
function parseJwt<T>(token: string): T | null {
  // Copilot will complete this function...

5Accepting Partial Suggestions

You don't have to accept a whole suggestion. Press Ctrl+Right to accept just the next word of a suggestion. This is especially useful when Copilot gets the right idea but the exact wording needs adjusting.

💡 Tip: Copilot learns from your code style within the file. Add a few examples of your preferred patterns at the top of a new file and it will mimic them throughout.

All 40 Lessons
Pick any lesson to jump straight to it.
L01
Getting Started with VS Code
FoundationBeginner
L02
The VS Code Interface & Layout
FoundationBeginner
L03
Installing & Managing Extensions
ExtensionsBeginner
L04
Keyboard Shortcuts & Command Palette
ProductivityBeginner
L05
Settings, Themes & Customization
CustomizationBeginner
L06
IntelliSense & Code Completion
Editor FeaturesBeginner
L07
Integrated Terminal Mastery
ProductivityBeginner
L08
Search, Find & Replace Across Files
Editor FeaturesBeginner
L09
Git & Source Control with VS Code
Version ControlBeginner
L10
Snippets & Emmet Abbreviations
ProductivityBeginner
L11
GitHub Copilot — Getting Started
AI & CopilotIntermediate
L12
Copilot Chat & Inline Ask
AI & CopilotIntermediate
L13
JavaScript & TypeScript Development
LanguagesIntermediate
L14
Python Development in VS Code
LanguagesIntermediate
L15
Debugging Like a Pro
DebuggingIntermediate
L16
Linting, Formatting & ESLint
Code QualityIntermediate
L17
Multi-Cursor Editing & Refactoring
Editor FeaturesIntermediate
L18
Workspaces & Multi-Root Projects
WorkspaceIntermediate
L19
Tasks, Build Systems & npm Scripts
WorkflowIntermediate
L20
Testing with Jest, Vitest & Pytest
TestingIntermediate
L21
React Development Workflow
Web DevIntermediate
L22
Node.js & Express in VS Code
BackendIntermediate
L23
Docker & Dev Containers
DevOpsIntermediate
L24
Live Share — Real-Time Collaboration
CollaborationIntermediate
L25
Jupyter Notebooks in VS Code
Data ScienceIntermediate
L26
REST Client & API Testing
API DevIntermediate
L27
SSH Remote Development
Remote DevIntermediate
L28
WSL 2 Integration on Windows
Remote DevIntermediate
L29
Advanced Debugging: Breakpoints & Watch
DebuggingAdvanced
L30
Copilot Agent Mode — Agentic Workflows
AI & CopilotAdvanced
L31
Profile & Performance Optimisation
PerformanceAdvanced
L32
GitHub Actions & CI/CD Integration
DevOpsAdvanced
L33
Custom Keybindings & Key Maps
CustomizationAdvanced
L34
Settings Sync & Dotfiles Management
WorkflowAdvanced
L35
Language Server Protocol (LSP) Explained
InternalsAdvanced
L36
Rust Development in VS Code
LanguagesAdvanced
L37
Go Development in VS Code
LanguagesAdvanced
L38
GitHub Codespaces & vscode.dev
Remote DevExpert
L39
Writing Your First VS Code Extension
Extension DevExpert
L40
Pro VS Code Workflow & Mastery
MasteryExpert