Inline Suggestions & Copilot Chat
Master inline code completions, next edit suggestions, and Copilot Chat slash commands — the core daily workflow of every Copilot user.
Master inline code completions, next edit suggestions, and Copilot Chat slash commands — the core daily workflow of every Copilot user.
As you type, Copilot predicts the code you're about to write and shows it as gray ghost text. This is the most frequent interaction you'll have with Copilot — accepting or skipping suggestions without breaking flow.
| Action | Key |
|---|---|
| Accept full suggestion | Tab |
| Accept word by word | Ctrl+Right (macOS: Cmd+Right) |
| Dismiss suggestion | Escape |
| See next suggestion | Alt+] |
| See previous suggestion | Alt+[ |
| Show all suggestions | Hover the ghost text → "Open Completions Panel" |
Copilot uses a large window of context to generate completions:
Writing a descriptive comment before a function dramatically improves completion quality:
# Parse a JWT token, return the payload dict, raise ValueError if expired or invalid
def parse_jwt(token: str) -> dict:Copilot will generate a full, working implementation based on the comment.
Next edit suggestions (NES) is a mode where Copilot doesn't just complete your current edit — it predicts where your next edit will be and jumps you there.
After you make a change — say, renaming a function — Copilot highlights the next location that probably needs updating (other call sites, tests, type definitions). Press Tab to jump to it and accept the suggested change. Keep pressing Tab to work through the full chain of related edits.
This is available in VS Code, Xcode, and Eclipse.
Next edit suggestions work best with TypeScript and Python, where type information gives Copilot strong signals about what needs updating after a refactor.
Open Copilot Chat with Ctrl+Alt+I (macOS: Cmd+Ctrl+I) or by clicking the chat icon in the activity bar. This opens a full conversation panel where you can ask questions, request code, debug errors, and explain concepts.
Chat is context-aware: it knows about your open files, selected code, and project structure.
Type any question or request in natural language:
What does the `useMemo` hook do and when should I use it?
Refactor this function to use early returns instead of nested if-statements
This test is failing — what's wrong?
Add context with # variables:
| Variable | What it includes |
|---|---|
| #file | A specific file from your workspace |
| #selection | Currently selected code |
| #codebase | Semantic search across your whole project |
| #git | Recent git changes or diffs |
| #terminalLastCommand | Output of the last terminal command |
Example:
#file:src/auth.ts Why does the token refresh happen twice on login?
Type / in chat to access built-in commands:
| Command | Purpose |
|---|---|
| /explain | Explain selected code or a concept |
| /fix | Fix a bug in selected code |
| /tests | Generate unit tests for selected code |
| /doc | Generate documentation for selected code |
| /new | Scaffold a new project or file |
| /clear | Start a fresh conversation |
Example workflow:
/fix it's returning undefined on the second callPress Cmd+I (Ctrl+I) to open a mini chat directly at your cursor position — no need to switch to the chat panel. Ask a quick question or make a targeted edit inline:
make this function async and await the database call
Copilot modifies the code inline and shows a diff. Accept with Enter, reject with Escape.
Inline completions handle your moment-to-moment typing flow. Chat handles questions and larger modifications. Next edit suggestions wire them together by tracking cascading changes across your project. The next module introduces agent mode — where Copilot operates autonomously across multiple files and your terminal.