Copilot inline suggestions appear as dimmed ghost text in your editor as you type. There are two kinds: ghost text suggestions that complete the current line, and next edit suggestions that predict what you will change next and where.
Before starting, make sure Copilot is active. If the Copilot icon in the Status Bar shows as inactive, follow the /vscode/how-to-set-up-github-copilot-free-in-vs-code guide first.
Ghost text suggestions
As you type in any code file, Copilot shows dimmed text completing the current line, the next few lines, or an entire block of code. This is a ghost text suggestion.
Accept or reject a suggestion
| Action | Windows/Linux | macOS |
|---|---|---|
| Accept full suggestion | Tab | Tab |
| Accept the next word or line | Ctrl+Right Arrow | Cmd+Right Arrow |
| Reject suggestion | Escape | Escape |
To partially accept a suggestion, press Ctrl+Right Arrow (or Cmd+Right Arrow on macOS). Copilot accepts the next word and the suggestion adjusts. Press it again to accept the next word. Press Escape to dismiss the remaining ghost text.
See alternative suggestions
Hover over a ghost text suggestion. If Copilot generated multiple alternatives, a hover menu appears showing the options. Select a different suggestion to replace the current one.
Not every suggestion has alternatives. Copilot shows alternatives when it is less certain about the best completion.
Generate suggestions from comments
Write a comment describing what you want, then press Enter. Copilot reads the comment and generates code that matches your description.
For example, in a JavaScript file, type:
// create a Student class with name, email, and GPA properties, plus a method that returns honor roll statusPress Enter, and Copilot can suggest an implementation on the next line. Review the generated code for correctness, security, and edge cases before accepting it.
Be specific in your comments. "Sort the array using quicksort" produces better suggestions than "sort the array."
Next edit suggestions (NES)
Next edit suggestions predict not just what code to write, but where your next edit should be and what it should be. Based on the edit you just made, Copilot looks ahead and suggests related changes in other parts of the file.
Enable next edit suggestions
NES requires the github.copilot.nextEditSuggestions.enabled setting. Open the Settings editor (Ctrl+, or Cmd+,), search for "next edit suggestions," and check the box. If the setting is grayed out, your organization may manage it.
How NES appears
VS Code marks a next edit suggestion in the editor and can show a gutter arrow toward a suggestion outside the current view. Hover over the indicator to preview the change and see the available actions.
Press Tab to navigate to and accept the suggested edit. Copilot can then offer another related edit, which you can review before pressing Tab again.
What NES catches
- Typo fixes: typing conts suggests changing to const.
- Logic errors: an inverted ternary or the wrong logical operator.
- Cascading renames: rename a variable once, and NES suggests updating it everywhere else in the file.
- Intent changes: add a z property to a class, and NES suggests updating related calculations to use z.
- Style matching: after pasting code, NES suggests adjusting it to match the surrounding code style.
Reduce distractions from NES
By default, NES shows the full code change in the editor when you Tab to it. Enable the editor.inlineSuggest.edits.showCollapsed setting to show changes only when you Tab to the suggestion or hover over the gutter arrow. This keeps the editor cleaner when you do not want to see pending edits.
Enable or disable suggestions
Globally or per language
Select the Copilot icon in the Status Bar. The menu shows checkboxes to enable or disable inline suggestions. It also shows an option to disable suggestions for the specific language of the active editor.
For fine-grained control, use the github.copilot.enable setting. Add this complete object to settings.json to disable suggestions for Markdown and plain text:
{
"github.copilot.enable": {
"markdown": false,
"plaintext": false
}
}Set "*": false to disable suggestions for all languages, then enable only the languages you want.
Snooze temporarily
When you want to focus without suggestions for a few minutes, select the Copilot icon in the Status Bar and choose Snooze. This pauses all inline suggestions for 5 minutes.
Each selection of Snooze adds another 5 minutes. Select Cancel Snooze to resume.
Snoozing does not affect Copilot Chat or agents. Only inline suggestions are paused.
Settings reference
| Setting | What it controls |
|---|---|
| github.copilot.enable | Enable or disable inline suggestions per language |
| github.copilot.nextEditSuggestions.enabled | Enable next edit suggestions |
| editor.inlineSuggest.showToolbar | Show or hide the hover toolbar on suggestions |
| editor.inlineSuggest.syntaxHighlightingEnabled | Enable syntax highlighting in ghost text |
| editor.inlineSuggest.edits.showCollapsed | Collapse NES changes until you Tab to them |
| editor.inlineSuggest.edits.renderSideBySide | Show large NES edits side by side or below |
Tips for better suggestions
Keep related files open in your editor. Copilot looks at open tabs to understand context. The more relevant context Copilot has, the better the suggestions.
Name your functions and variables descriptively. calculateMonthlyRevenue gives Copilot more to work with than calc. Write short, descriptive comments above functions even when not using comment-driven generation.
If suggestions feel unrelated to your code, open the files that define the functions or types you are using. Copilot reads across open tabs but does not automatically load your entire project. For chat-based assistance, learn how to /vscode/how-to-use-copilot-chat-with-files-folders-symbols-and-terminal-context.
Rune AI
Key Insights
- Ghost text suggestions appear as dimmed text as you type. Press Tab to accept a full suggestion or Cmd/Ctrl+Right Arrow to accept part of it.
- Next edit suggestions predict both the location and content of a likely next edit.
- Hover over ghost text to see its controls and any available alternatives.
- Descriptive comments can guide the next suggestion, but generated code still needs review.
- Snooze from the Copilot Status Bar menu to pause inline suggestions temporarily.
- Enable NES with the
github.copilot.nextEditSuggestions.enabledsetting.
Frequently Asked Questions
How do I temporarily stop Copilot from suggesting code?
What should I check if Tab does not accept a suggestion?
How do I change the model used for inline suggestions?
Conclusion
Ghost text suggestions complete the line you are typing. Next edit suggestions predict what you will change next. Use Tab to accept, Escape to reject, and hover for alternatives. When suggestions get distracting, press Escape or enable collapsed mode for next edit suggestions.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.