Write the Comment, Then Wait

Copilot's inline suggestions are only as good as the surrounding signal. A descriptive function name plus a one-line comment of intent produces dramatically better completions than an empty body. Treat the comment as a mini-prompt: // parse an RFC3339 timestamp, return null on failure gets you a near-correct implementation in one keystroke.

Use the Right Chat Command for the Job

Copilot Chat ships purpose-built slash commands. Reach for them instead of describing the task in prose:

CommandUse it for
/explainUnderstanding unfamiliar code you've selected
/fixResolving an error or a flagged problem
/testsGenerating unit tests for the selection
/docWriting docstrings and comments

Pull in Real Context with @workspace and #file

By default chat only sees your open file. Prefix a question with @workspace to let Copilot search the whole project ("@workspace where do we configure the database pool?"), or reference specific files with #file so it answers against the code that actually matters instead of guessing.

Set Custom Instructions Once

Drop a .github/copilot-instructions.md in your repo to encode standing rules — preferred libraries, naming conventions, "always use async/await, never .then()". Copilot applies them to every suggestion and chat response in that project, so you stop correcting the same things by hand.

Switch to Edit / Agent Mode for Multi-File Changes

Inline completion is for a single spot. When a change spans files — rename a concept, thread a new parameter through a call chain — use Copilot Edits (or agent mode) to propose a coordinated multi-file diff you review and apply together.

Always Read the Diff

Copilot is confident even when wrong — it will happily invent an API that doesn't exist. Treat every suggestion as a draft from a fast junior dev: useful, but reviewed before it lands.

Accept Partially with Word-by-Word

You don't have to take or reject a whole suggestion. Accept it word-by-word (or line-by-line) when only the first part is right — it's faster than deleting the tail and re-prompting.

Frequently Asked Questions

Is Copilot Chat different from inline suggestions?

Yes. Inline suggestions complete code as you type; Chat is a conversational panel with slash commands, workspace search, and multi-file edits. Use both.

Will custom instructions slow Copilot down?

No meaningful impact. They're injected as context and mostly improve relevance, reducing the back-and-forth that actually costs you time.

Can Copilot see my whole repository?

Only when you ask it to via @workspace, or in agent mode. Plain inline completion is scoped to nearby code in the open file.

References & Further Reading