How do GitHub Copilot's next edit suggestions in VS Code carry a rename's follow-on edits, and which settings control them?
answer
- predicts where, not just what
- an arrow in the gutter
- Tab twice: go, then take
- nextEditSuggestions.enabled
- showCollapsed hides the preview
basics
~20 sNext edit suggestions (NES) predict both where your next edit goes and what it is, from the edits you just made. A gutter arrow marks it, Tab jumps there and Tab again accepts; github.copilot.nextEditSuggestions.enabled is the switch.
solid answer
~50 sGhost text completes at the cursor; **next edit suggestions** (Copilot NES) look at the edits you are making and predict the *location* and the *content* of the next one, from a single symbol to several lines. Rename a variable once and NES suggests updating its other uses; change `Point` to `Point3D` and it proposes a `z` field, then the distance formula. An arrow in the gutter marks the suggestion (pointing up or down when it is off-screen); `Tab` moves you to it and `Tab` again accepts. The switch is `github.copilot.nextEditSuggestions.enabled` — `true` by default in VS Code's settings reference, though on Business or Enterprise plans GitHub's docs require the organisation's **Editor preview features** policy. `editor.inlineSuggest.edits.showCollapsed` hides the preview until you press `Tab` or hover, and `github.copilot.nextEditSuggestions.fixes` adds suggestions from diagnostics such as a missing import.
go deeper
Recall the gutter arrow and the two Tabs: the first moves you to the suggested edit, the second accepts it.
Explain how NES differs from ghost text, the enabling setting and its default, the diagnostics-based fixes and the collapsed display option.
Diagnose a missing NES: the setting, the organisation's Editor preview features policy on Business or Enterprise, a metered connection, or a Vim keybinding conflict.
Weigh NES as a rename and refactor aid against its interruptions, and decide whether the team's defaults should collapse previews or keep them visible.
## Ghost text versus next edit suggestions GitHub Copilot in VS Code produces two kinds of **inline suggestions**. Both are built from your current and open files; they differ in *where* they apply. | | Ghost text | Next edit suggestions (NES) | |---|---|---| | Where it appears | At the cursor, as dimmed text | At a predicted location, at or away from the cursor | | What it predicts | The code you are about to type | The next edit you will want, and where it goes | | Size | Rest of a line up to a whole block | A single symbol, a line, or several lines | | Accept | `Tab` | `Tab` to jump there, `Tab` again to accept | | Setting | `github.copilot.enable` (per language) | `github.copilot.nextEditSuggestions.enabled` | The VS Code docs frame NES as the natural next step: most coding is **editing existing code**, and edits come in a logical sequence rather than in isolation. ## Walking through a rename The docs' own examples show the follow-on edits NES is for: 1. You change a class name from `Point` to `Point3D`. 2. A **gutter arrow** appears; NES proposes adding a `z` member to the class. 3. You press `Tab` — the cursor **moves** to the suggestion — and `Tab` again **accepts** it. 4. NES now proposes adding `z` to the distance calculation, and the loop repeats. The same pattern covers renaming a variable once and being offered the other uses, adjusting pasted code to match the surrounding style, and catching mistakes: a typo such as `conts x = 5`, an inverted ternary, or `||` that should have been `&&`. ## Turning it on, and who can - `github.copilot.nextEditSuggestions.enabled` enables NES. VS Code's AI settings reference lists its default as **`true`**; the inline-suggestions page still words it as "enable the setting", so check it when NES never appears. - On **Copilot Business** or **Copilot Enterprise**, GitHub's configuration guide says the organisation or enterprise must enable the **Editor preview features** policy; flipping the VS Code setting alone is not enough. - `github.copilot.nextEditSuggestions.fixes` (default `true`) lets NES propose edits based on **diagnostics** — the squiggles — for example a missing import. - Users of the VS Code Vim extension are told to run its latest version to avoid keybinding conflicts with NES. ## Reading the gutter arrow The arrow is the whole user interface of NES, so it pays to read it precisely: - Its **position** shows where the next edit suggestion sits relative to your cursor. - When the suggestion is **outside the visible part of the editor**, the arrow points **up or down** toward it. - **Hovering** it opens the edit suggestion menu, listing the keyboard shortcuts and settings for NES. - For screen-reader and audio users, `accessibility.signals.nextEditSuggestion` (default `{ "sound": "auto", "announcement": "auto" }`) plays a cue or makes an announcement when a suggestion is available. ## Display settings | Setting | Default | Effect | |---|---|---| | `editor.inlineSuggest.edits.showCollapsed` | `false` | When `true`, the change is shown only after you press `Tab` to go there or hover the gutter arrow | | `editor.inlineSuggest.edits.renderSideBySide` | `"auto"` | `auto` shows larger edits beside the code when the viewport has room; `never` always shows them below | | `editor.inlineSuggest.edits.allowCodeShifting` | `"always"` | Whether NES may shift your code to make room for a suggestion | Hovering the gutter arrow opens the **edit suggestion menu**, with the keyboard shortcuts and a **Show Collapsed** option that does the same as the setting. ## What NES is not - It is **not chat**: you do not describe the rename; NES infers the next step from edits you already made. Asking Copilot to rewrite code is a chat or agent job. - It is **not affected by Change Completions Model**: GitHub's docs say that command changes only the ghost-text model, not the NES model or Chat's. - It is **not a commitment**: a proposal is applied only when you accept it with the second `Tab`; keep typing and it is not applied. - On a **metered connection**, VS Code starts no new automatic NES requests, just as for ghost text.
- The NES preview keeps drawing code beside what you are typing and you find it distracting. What do you change?Set `editor.inlineSuggest.edits.showCollapsed` to `true`, or choose **Show Collapsed** from the gutter arrow's menu. The arrow still marks the suggestion, but the code change is shown only once you press `Tab` to navigate to it or hover the arrow. NES itself stays on.
- A Copilot Business user has `github.copilot.nextEditSuggestions.enabled` set to `true` and never sees a gutter arrow. What do you check next?Whether the organisation or enterprise providing the seat has enabled the **Editor preview features** policy; GitHub's configuration guide makes NES depend on it for Business and Enterprise plans. Also check the connection is not metered, since VS Code then starts no new automatic suggestion requests.
- Does picking another model with Change Completions Model change what NES proposes?No. GitHub's docs say switching the completions model affects only ghost-text suggestions; next edit suggestions and Copilot Chat keep their own models.
- Next edit suggestions only complete text at the cursor, exactly like ghost text.
- The first Tab on a next edit suggestion applies the edit wherever it is.
- Change Completions Model also switches the model behind next edit suggestions.
- You trigger next edit suggestions by describing the rename in Copilot Chat.
- On Copilot Business the VS Code setting alone always enables next edit suggestions.