← Back to Main Page

Top 10 Copilot Tips

Posted on Jun 27, 2025

Usage

Copilot isn’t magic, but it sure feels that way sometimes. Want to get more out of it? Here are the top 10 ways you can use Copilot to write better code, save time, and make your dev life smoother.

ProTips
  1. Start with a comment. Plain English instructions (or any spoken language) help Copilot “think” in your context. Try “// build a function that…” or “# check if file exists…”
  2. Prompt for style. Want a function in a specific style? Just say so: “// as a one-liner” or “// use async/await.”
  3. Cycle through suggestions. Press Alt+] or Alt+[ (or use Ctrl+]/Ctrl+[ on Mac) to see alternate completions.
  4. Be specific, not just brief. “// sort list” works, but “// sort users by signup date descending, handle empty case” is better.
  5. Refactor with Copilot Chat. Highlight code, ask Copilot Chat for a rewrite, simplification, or new feature—it’ll walk you through options and let you edit or accept its changes.
  6. Leverage docs and types. Copilot uses inline documentation and type hints. Keep your docstrings and JSDoc up-to-date for better predictions.
  7. Quickly write tests. Comments like “# test for edge cases” or “// create tests for validation” let Copilot suggest realistic, scenario-based tests.
  8. Use Copilot in PRs and code reviews. Summarize diffs, explain code, or auto-generate review comments in VS Code and on GitHub.com.
  9. Don’t accept everything. Copilot is smart, not infallible. Review and edit before shipping; it can make mistakes or miss context.
  10. Share your own pro tips! The more Copilot learns from real-world usage, the better it gets. Contribute feedback and ideas on the GitHub Copilot repo.
  11. Use context files strategically. Open related files in VS Code tabs before coding—Copilot reads your workspace context and suggests code that matches your project's patterns, naming conventions, and architecture.