top of page

Github Copilot - Advanced Features

Advanced GitHub Copilot Features


The Basics:

  • Copilot suggestions appear as ghost text

  • Accept suggestion with Tab

  • Uses open files as context by default

  • Prompts can be given through:

    • Comments

    • Chat panel

    • Inline chat


Chatting with Copilot:

  • Use the chat panel in VS Code

  • Ask:

    • Code questions

    • Software-related questions

  • Good for interactive discussions


Inline Chat:

  • Use Copilot directly inside code

  • Shortcut:

    • Ctrl+I on Windows

    • Command+I on Mac

  • Helps without leaving the editor


Slash Commands:

  • Used in chat or inline chat

  • Help with common tasks quickly

  • Examples:

    • /tests → generate tests

    • /docs → write documentation

  • Better than long prompts for common actions


Agents:

  • Special context-aware Copilot helpers in VS Code

  • Examples:

    • @terminal → help with terminal tasks

    • @workspace → understands the full project

  • Example:

    • @workspace how can I package this project?


Exam Tip Summary:

  • Advanced features include:

    • Ghost text

    • Chat pane

    • Inline chat

    • Slash commands

    • Agents

  • Key shortcuts:

    • Tab = accept suggestion

    • Ctrl+I / Command+I = inline chat

  • Agents add specialized context

  • Slash commands improve speed and response quality

Advanced Tasks with GitHub Copilot


Implicit Prompts:

  • Copilot can understand intent without detailed prompts

  • Use inline chat (Ctrl+I / Cmd+I) + slash commands

  • Example:

    • /fix → fixes bugs in selected code

  • Works by using context + built-in prompt patterns


Key Slash Commands:

  • /fix → fix bugs

  • /doc → add documentation/comments

  • /explain → explain code

  • /generate → generate code

  • /optimize → improve performance

  • /tests → create unit tests

  • /help → usage help

Exam Tip:

  • Slash commands = faster + more precise than long prompts


Selective Context (Very Important):

Copilot can focus on different scopes:

  • @workspace → entire project

  • @terminal → terminal output

  • @file → specific file

  • @directory → folder

Examples:

  • @workspace create Dockerfile

  • @terminal fix this error

  • @file refactor this function

  • @directory optimize scripts


Context Advantage:

  • No need to open many files

  • Copilot uses:

    • Project structure

    • Files

    • Environment context


Improving Results:

  • If output is wrong:

    • Reword prompt

    • Add constraints (e.g., “use Python virtual env”)

    • Combine features (agents + slash commands)


Exam Summary (Must Remember):

  • Implicit prompts = minimal input, smart output

  • Slash commands = predefined powerful actions

  • Agents (@workspace, @file, etc.) = context control

  • Better prompts → better results

 
 
bottom of page