Chuyển đến nội dung chính

Lesson 2: Install & Configure GitHub Copilot in VS Code

Sign up for GitHub Copilot (Free/Pro/Pro+/Enterprise), install extensions, configure settings, choose model (GPT-5.4, Claude, Gemini), Auto Model Selection, keyboard shortcuts and basic workflow.

💻 Programming — Lesson 2 Lesson 2: Install & Configure GitHub Copilot in VS Code

Vibe Coding with GitHub Copilot: From Basics to Advanced

Part 1: Vibe Coding Platform & GitHub Copilot

xdev.asia

1. GitHub Copilot Packages (2026)

GitHub Copilot offers a variety of plans suitable for individuals and businesses:

Package Price Main characteristics
Copilot Free $0/month Limit inline suggestions & chat interactions/month. Auto model selection.
Copilot Pro $10/month Unlimited completions & chat. Many models. Copilot Memory (preview).
Copilot Pro+ $39/month Premium models, Copilot Memory, Cloud Agent, higher rate limits.
Copilot Business $19/user/month Organization policies, content exclusion, audit logs, IP indemnity.
Copilot Enterprise $39/user/month Knowledge bases, fine-tuned models, advanced security.

Especially for students: GitHub offers Copilot for free through the program GitHub Education (GitHub Student Developer Pack).

2. Install GitHub Copilot in VS Code

Step 1: Install VS Code

Download and install from code.visualstudio.com. Recommended to use version Stable (or Insiders if you want to experience the latest features).

Step 2: Log in to GitHub Copilot

  1. Open VS Code
  2. Hover in Copilot icon in Status Bar (lower right corner)
  3. Select "Set up Copilot"
  4. Log in to your GitHub account
  5. If you do not have a subscription → automatically subscribe Copilot Free
Status Bar: [Copilot Icon] → "Set up Copilot" → Sign in with GitHub

Step 3: Confirm installation

After successful login:

  • Copilot icon in Status Bar changes to active state
  • Open any code file → start typing → see inline suggestions (ghost text)
  • Open Chat view with Ctrl+Cmd+I (macOS) or Ctrl+Alt+I (Windows/Linux)

3. Select AI Model

GitHub Copilot allows you to choose the right AI model for each task:

Current models (March 2026):

Model Provider Characteristics
GPT-5.4 OpenAI Latest, strongest for coding. GA from Mar 2026.
GPT-5.4 mini OpenAI Lighter, faster, suitable for simple tasks.
GPT-5.3-Codex OpenAI Long-term support, optimized for code generation.
Claude (Anthropic) Anthropic Strong in reasoning, instructions follow.
Gemini 3.1 Pro Google Long context, supports JetBrains/Xcode/Eclipse.
Grok Code Fast 1 xAI Fast, used in Copilot Free auto selection.

Auto Model Selection

By default, Copilot is used Auto — automatically selects the best model for each prompt. You can change by clicking model dropdown in Chat view.

Chat view → Model dropdown (góc trên) → Chọn model cụ thể hoặc "Auto"

4. Configure important Settings

Open VS Code Settings (Cmd+,) and search "copilot":

4.1. Inline Suggestions

{
  // Bật/tắt inline suggestions
  "editor.inlineSuggest.enabled": true,

// Bật Next Edit Suggestions (NES) "editor.inlineSuggest.edits.enabled": true,

// Tự động hiển thị suggestions "github.copilot.editor.enableAutoCompletions": true }

4.2. Agent Mode

{
  // Bật Agent mode (quan trọng!)
  "chat.agent.enabled": true,

// Cho phép agent chạy terminal commands "github.copilot.chat.agent.runCommands": true }

4.3. Specific language

{
  // Tắt Copilot cho một số ngôn ngữ
  "github.copilot.enable": {
    "*": true,
    "plaintext": false,
    "markdown": true,
    "yaml": true
  }
}

5. Keyboard Shortcuts to remember

Shortcuts (macOS) Shortcuts (Win/Linux) Function
Tab Tab Accept inline suggestions
Esc Esc Dismiss suggestions
Option+] Alt+] Next suggestions
Option+[ Alt+[ Previous suggestions
Cmd+→ Ctrl+→ Accept word-by-word
Cmd+I Ctrl+I Inline Chat
Ctrl+Cmd+I Ctrl+Alt+I Open Chat view

6. First interaction

6.1. Test Inline Suggestions

Create files hello.py and start typing:

# Function to calculate fibonacci numbers
def fibonacci(

Copilot will automatically suggest the function body. Press Tab to accept.

6.2. Test Chat View

Open Chat view (Ctrl+Cmd+I) and enter:

Create a simple Python script that reads a CSV file and generates a bar chart using matplotlib

6.3. Test Agent Mode

In Chat view, select Agent from dropdown and enter:

Create a simple todo web app with HTML, CSS, and JavaScript. Make it modern and responsive.

Watch the Agent automatically create files, write code, and set up projects.

7. Understand the Copilot interface structure

┌─────────────────────────────────────────────────┐
│  VS Code + GitHub Copilot                       │
├─────────────────────────────────────────────────┤
│                                                  │
│  ┌──────────┐  ┌────────────────────────────┐   │
│  │ Chat     │  │ Editor                     │   │
│  │ View     │  │                            │   │
│  │          │  │  [Ghost text suggestions]   │   │
│  │ Agent ▼  │  │                            │   │
│  │ Model ▼  │  │  Cmd+I → Inline Chat      │   │
│  │          │  │                            │   │
│  │ Sessions │  │                            │   │
│  │ list     │  │                            │   │
│  └──────────┘  └────────────────────────────┘   │
│                                                  │
│  Status Bar: [Copilot ●] [Model: Auto]          │
└─────────────────────────────────────────────────┘

8. Troubleshooting common problems

Problem Solution
Don't see suggestions Check the Copilot icon in the Status Bar, make sure you are signed in
Agent mode is not displayed Turn on chat.agent.enabled in Settings
Low quality suggestions Try changing the model, adding context (comments, open files)
Rate limit reached Upgrade from Free to Pro, or wait for a new month reset
Extension conflicts Turn off other AI extensions (Tabnine, Codeium...)

9. Summary

You're ready to start Vibe Coding! Summary of what was done:

  • ✅ Understand Copilot packages and choose the right package
  • ✅ Install and log in to GitHub Copilot in VS Code
  • ✅ Choose the appropriate AI model
  • ✅ Configure important settings
  • ✅ Understand keyboard shortcuts
  • ✅ Successfully tested inline suggestions, chat, and agent mode

In the next article, we will go deeper Inline Suggestions & Next Edit Suggestions — core features that help you code faster every day.