Inline Suggestions
Ghost text completions and Next Edit Suggestions (NES) in the editor
title: "Inline Suggestions" description: "Ghost text completions and Next Edit Suggestions (NES) in the editor" section: "Copilot" readTime: "4 min"
Inline Suggestions
Copilot provides two types of inline suggestions that match your coding style and take existing code into account.
Ghost Text Suggestions
As you type, dimmed ghost text appears at your cursor — completing the current line or suggesting a full function implementation.
Accepting suggestions:
- Tab — accept the full suggestion
- Ctrl+Right — accept next word only
- Alt+] / Alt+[ — cycle through alternative suggestions
- Escape — dismiss
Prompting with code comments: Write a comment describing what you want, then press Enter. Copilot reads the comment and generates code matching the description:
// Create a Student class with name, grade, and GPA properties
// Include methods for isHonorRoll() and getLetterGrade()Next Edit Suggestions (NES)
NES predicts where your next edit should be and what it should contain — even in different parts of the file.
Enable NES: Set github.copilot.nextEditSuggestions.enabled to true.
Navigation: A gutter arrow shows when a suggestion is available. Press Tab to navigate to it, then Tab again to accept.
NES Use Cases
| Scenario | What NES does |
|---|---|
Typo (conts x) | Suggests const x |
Rename Point to Point3D | Suggests adding z coordinate throughout |
| Rename variable | Suggests updating all occurrences in file |
| Copy-paste code | Suggests adapting it to match local code style |
Change && to || | Detects logical error, suggests correction |
Enable / Disable
- Status Bar → Copilot menu — toggle inline suggestions globally or per file type
- Setting:
github.copilot.enable(per language, use"*"for all) - Snooze — temporarily disable for 5 minutes; Resume with Cancel Snooze
Change the AI Model
Command Palette → GitHub Copilot: Change Completions Model → select from available models.
Key Settings
| Setting | Purpose |
|---|---|
github.copilot.enable | Enable/disable per language |
github.copilot.nextEditSuggestions.enabled | Enable NES |
editor.inlineSuggest.showToolbar | Show/hide suggestion toolbar |
editor.inlineSuggest.edits.renderSideBySide | NES display: side-by-side or below |
github.copilot.nextEditSuggestions.fixes | NES based on diagnostics (squiggles) |
Tips
- Open related files to give Copilot more context for better suggestions
- Use meaningful function/variable names — they guide better completions
- NES is aware of the edit flow, not just cursor position