Skip to content
Core feature · 01Verified 2 Nov 2026

Inline suggestions & ghost text

Copilot predicts the next characters, lines or whole blocks as you type and shows them as dimmed ghost text. Next edit suggestions go further — predicting where your next edit should happen and what it should be.

Ghost text in action

Type a signature, pause, and Copilot proposes the rest. Accept all of it, a word at a time, or dismiss it.

copilot-masterclass — Visual Studio Code
price.tscart.ts
1// Format a price for display in the user's currency
2export function
3
4
5
6
7
mainTypeScript
Typing…

Getting multi-line suggestions

Copilot decides the length of a suggestion from context. These patterns reliably produce full blocks.

Keep typing

Suggestions appear automatically as dimmed ghost text after a short pause. They can be single-line or a whole block.

Write a comment

A descriptive comment above an empty function body is the most reliable multi-line trigger: Copilot completes the implementation below it.

Start a signature

A typed function name and parameters (e.g. function formatPrice() give strong intent. Good names beat long comments.

Press Enter inside a block

A new line inside a function, object or loop body often yields a multi-line suggestion for the rest of the block.

Trigger manually

Press ⌥+\ (macOS) or Alt+\ (Windows/Linux) to request a suggestion when none is showing.

See alternatives

Hover the suggestion for the toolbar, or cycle with ⌥+] / ⌥+[. Ctrl+Enter opens a pane with more suggestions.

Accepting, partially accepting and cycling (VS Code)

Partial acceptance lets you take the part of a suggestion you trust and keep typing.

ActionmacOSWindows / Linux

Accept inline suggestion

editor.action.inlineSuggest.commit

TabTab

Dismiss inline suggestion

editor.action.inlineSuggest.hide

EscEsc

Accept next word of suggestion

editor.action.inlineSuggest.acceptNextWord

⌘+→Ctrl+→

Accept next line of suggestion

Accept Next Line Of Inline Suggestion

——

Show next suggestion

editor.action.inlineSuggest.showNext

⌥+]Alt+]

Show previous suggestion

editor.action.inlineSuggest.showPrevious

⌥+[Alt+[

Trigger inline suggestion

editor.action.inlineSuggest.trigger

⌥+\Alt+\

Open more suggestions in a separate pane

github.copilot.generate

Ctrl+ReturnCtrl+Enter

Jump to next edit suggestion

TabTab

Accept next edit suggestion

TabTab

Reject next edit suggestion

EscEsc

Accept next line has no default key

The command editor.action.inlineSuggest.acceptNextLine exists but is unbound. Add your own binding — see the snippet.
keybindings.json
// keybindings.json — bind "accept next line", which has no default key
[
  {
    "key": "ctrl+alt+right",
    "command": "editor.action.inlineSuggest.acceptNextLine",
    "when": "inlineSuggestionVisible && !editorReadonly"
  }
]

Next edit suggestions (NES)

NES predicts the location and content of your next edit based on edits you just made — even far from the cursor.

geometry.ts — next edit suggestion
geometry.ts
1interface Point3D { x: number; y: number; z: number; }
2
function distance(a: Point3D, b: Point3D) {
4 return Math.hypot(a.x - b.x, a.y - b.y);
4 return Math.hypot(a.x - b.x, a.y - b.y, a.z - b.z);
5}

You added z to the interface → Copilot NES proposes the matching change. Tab to jump, Tab to accept.

mainTypeScript

An arrow in the gutter marks a pending suggestion. Press Tab to jump to it, then Tab again to accept, or Esc to dismiss.

Typical wins: propagating a renamed variable, adding a new field everywhere it's needed, fixing a typo pattern, or updating call sites after a signature change.

Enable it with github.copilot.nextEditSuggestions.enabled. NES is generally available in VS Code and Visual Studio, and in preview in JetBrains, Eclipse and Xcode.

.vscode/settings.json
{
  // Turn inline suggestions on/off globally or per language
  "github.copilot.enable": {
    "*": true,
    "markdown": false,
    "plaintext": false
  },
  // Next edit suggestions (NES)
  "github.copilot.nextEditSuggestions.enabled": true,
  // Editor-level behaviour for all inline suggestions
  "editor.inlineSuggest.enabled": true,
  "editor.inlineSuggest.showToolbar": "onHover"
}

Custom instructions don't apply here

Repository and personal instructions are used by chat, agents and code review — not by inline suggestions. Shape completions with good names, comments, types, and the files you keep open.

Context = what's open

Inline suggestions draw on the current file and related open tabs. Open the interfaces, tests or examples you want Copilot to follow; close unrelated files.