GitHub Copilot Basics
Welcome to another episode of Bite-Sized. In this video, we introduce GitHub Copilot, your AI-powered coding assistant inside VSCode.
GitHub Copilot is an AI pair programmer powered by OpenAI. It suggests code snippets and whole functions based on the context in your file, making coding faster and smarter.
How to Install and Enable Copilot in VSCode
- Open the Extensions tab in VSCode.
- Search for GitHub Copilot and click Install.
- Sign in with your GitHub account when prompted.
Note: Copilot requires a subscription, but students get free access via GitHub Education.
Trying It Out – Copilot in Action
Let’s see Copilot help write a function. For example, type this comment:
# Function that prints "Hello, World!"
Copilot will suggest the full function automatically. Press Tab to accept the suggestion.
You can cycle through different suggestions using:
- Alt + ] and Alt + [ (Windows/Linux)
- Option + ] and Option + [ (Mac)
Tips for Using Copilot Effectively
- Use descriptive function and variable names — Copilot reads context.
- Write comments describing what you want to do; Copilot uses them as hints.
- Always review suggestions before accepting to ensure correctness.
Copilot assists you but doesn't replace your coding skills. Treat it as a powerful helper, not an autopilot.
Closing
With GitHub Copilot, you can write code more efficiently and get inspired by AI-powered suggestions.
If you haven’t seen our videos on setting up Python, virtual environments, or Git integration in VSCode, be sure to check those out too.
Thanks for watching!