Detailed Reference: https://code.visualstudio.com/docs/copilot/overview Cheatsheet: https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features

GitHub Copilot in Visual Studio Code provides AI-powered features to help you write code faster and with less effort. This cheat sheet provides a quick overview of the features for GitHub Copilot in Visual Studio Code.

You can access GitHub Copilot in VS Code through the Chat view, directly in the editor, from the integrated terminal, and via AI-powered enhancements in the VS Code user interface.

Features

  1. Code completion
  2. Copilot Chat
  3. Copilot Coding agent
  4. Copilot in the CLI
  5. Copilot code review
  6. Copilot pull request summaries
  7. Copilot text completion
  8. Copilot Edits
    1. Edit mode: Use edit mode when you want more granular control over the edits that Copilot proposes. In edit mode, you choose which files Copilot can make changes to, provide context to Copilot with each iteration, and decide whether or not to accept the suggested edits after each turn.
    2. Agent mode: Use agent mode when you have a specific task in mind and want to enable Copilot to autonomously edit your code. In agent mode, Copilot determines which files to make changes to, offers code changes and terminal commands to complete the task, and iterates to remediate issues until the original task is complete.

Code Completion keyboard Shortcuts

Action Shortcut
Inline chat Ctrl+I
Accept an inline suggestion Tab
Accept next word of the suggestion Ctrl+Right Arrow
Dismiss an inline suggestion Esc
Show next inline suggestion Alt+]
Show previous inline suggestion Alt+[
Trigger inline suggestion Alt+\
Open GitHub Copilot (additional suggestions in separate pane) Ctrl+Enter
Chat view Ctrl+Alt+I
Quick Chat Ctrl+Shift+Alt+L

Copilot Chat

Slash commands

Use slash commands to simplify common tasks without writing complex prompts. To use a slash command, type / in the chat prompt box, followed by the command name.

Available slash commands vary depending on your environment and chat context. To see which commands are currently available, type / in the chat prompt box. Here are some of the most common slash commands for Copilot Chat: