NEW: Claude Code Security — research preview →

Inline Suggestions

Ghost text completions and Next Edit Suggestions (NES) in the editor

Read time: 4 min

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. Code completions and next edit suggestions are not billed in AI credits.

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 (you can also hover over a suggestion to see alternatives)
  • 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: Toggle github.copilot.nextEditSuggestions.enabled (the VS Code settings reference lists it as true by default).

Navigation: A gutter arrow shows when a suggestion is available. Press Tab to navigate to it, then Tab again to accept.

NES Use Cases

ScenarioWhat NES does
Typo (conts x)Suggests const x
Rename Point to Point3DSuggests adding z coordinate throughout
Rename variableSuggests updating all occurrences in file
Copy-paste codeSuggests 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 — in the Status Bar menu, select Snooze to add five minutes; resume with Cancel Snooze (also available as Command Palette commands)

Change the AI Model

Chat menu in the title bar → Configure Inline Suggestions... → Change Completions Model... (or run GitHub Copilot: Change Completions Model). Business and Enterprise users need an admin to enable Editor Preview Features in Copilot policy settings.

Key Settings

SettingPurpose
github.copilot.enableEnable/disable per language
github.copilot.nextEditSuggestions.enabledEnable NES
editor.inlineSuggest.showToolbarShow/hide suggestion toolbar
editor.inlineSuggest.edits.renderSideBySideNES display: side-by-side or below (default auto)
editor.inlineSuggest.edits.showCollapsedHide NES changes until you navigate to them
github.copilot.nextEditSuggestions.fixesNES 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
  • On metered connections Copilot does not start automatic suggestions; run Trigger Inline Suggestion from the Command Palette