by GitHub
GitHub Copilot is the most widely adopted AI coding assistant, integrated directly into VS Code, JetBrains, and Neovim. Powered by OpenAI models, it excels at inline completions and understanding code context.
Write a comment describing what you want, then let Copilot complete:
// Fetch user by ID, return null if not found, throw if DB error
async function getUser(id: string): Promise<User | null> {
// Copilot completes the implementation
}
Open relevant files in tabs — Copilot uses open files as context:
1. Open your type definitions file
2. Open an example of a similar function
3. Start writing your new function
→ Copilot will follow the established patterns
/explain — explain selected code
/fix — suggest a fix for a bug
/tests — generate tests for selected code
/doc — generate documentation
@workspace — ask about the entire project
| Shortcut | Action |
|---|---|
| Tab | Accept suggestion |
| Esc | Dismiss suggestion |
| Alt+] | Next suggestion |
| Alt+[ | Previous suggestion |
| Ctrl+Enter | Open Copilot panel (10 suggestions) |
| Practice | Why |
|---|---|
| Write descriptive function names | Better completions from good names |
| Add type signatures first | Copilot uses types to generate body |
| Keep files focused | Smaller files = better context |
| Accept and edit | Faster than writing from scratch |
| Use /tests command | Test generation is Copilot's sweet spot |
Quick tips from the community about what works with Copilot (GitHub) right now.
Sign in to share a tip.
No tips yet. Add a tip for this model.