GitHub Copilot is more than just code suggestions — it’s a full productivity assistant for developers. Whether you’re using Visual Studio Code, Visual Studio, or JetBrains, knowing the right commands and shortcuts can save you time and effort.
Here’s a complete cheat sheet with all the essential GitHub Copilot commands, keyboard shortcuts, and slash commands you need to boost your workflow.
💡 Copilot Suggestions Shortcuts
These shortcuts help you quickly accept, reject, or browse through Copilot’s code completions:
- Tab → Accept Copilot suggestion
- Alt + . → Show next suggestion
- Alt + , → Show previous suggestion
💬 Copilot Chat Shortcuts
Copilot Chat is like having an AI coding buddy inside your IDE. Use these to start conversations faster:
- Ctrl + Alt + I / Ctrl + Cmd + I → Open Copilot Chat panel
- Ctrl + I / Cmd + I → Start inline chat directly in the editor
- Ctrl + Shift + Alt + L → Open Quick Chat / Agent mode
- Alt + / → Open inline chat in Visual Studio
🚀 Copilot Slash Commands
Slash commands give you quick, powerful ways to ask Copilot to do specific tasks:
- /fix → Automatically fix compiler or linting errors
- /explain → Get an explanation of the selected code
- /tests → Generate unit tests (supports frameworks like Jest, xUnit, etc.)
- /docs → Add or improve documentation comments
- /generate → Generate a code snippet for a described task
- /optimize → Suggest performance and efficiency improvements
🛠️ Chat Helpers
Make your chat conversations with Copilot smarter by using these helpers:
- @ → Tag a specialist agent (e.g.,
@workspacefor project-wide context) - # → Reference a file or a specific line (e.g.,
#app.js:24)
⚙️ Repository Configuration
Want Copilot to follow your project’s rules and style guide? You can configure it at the repo level:
- .github/copilot-instructions.md → Add custom instructions so Copilot knows how to follow your coding style and conventions
🔥 Pro Tips for Developers
- Type / in Copilot Chat to see all available slash commands
- Use @workspace to ask questions about your entire project, not just the current file
- Keep your README.md and copilot-instructions.md updated — Copilot uses them to understand your project better