How to accept or reject code suggestions on GitHub Copilot

beginner 8 min read Updated 2026-03-18
Quick Answer

GitHub Copilot provides inline code suggestions that you can accept with Tab, reject with Esc, or cycle through alternatives with Alt+] and Alt+[. You can also accept suggestions partially using Ctrl+→ to accept word by word.

Prerequisites

  • GitHub Copilot extension installed in your IDE
  • Active GitHub Copilot subscription
  • Copilot enabled in your editor settings
  • Basic familiarity with your code editor

Step-by-Step Instructions

1

Trigger Copilot suggestions

Start typing code in your editor or add a comment describing what you want to accomplish. GitHub Copilot will automatically display suggestions in gray text after the cursor. The suggestions appear inline as you type, typically after a brief pause.
Copilot works best with descriptive comments and clear context from surrounding code.
2

Accept the entire suggestion

When you see a suggestion you want to use, press the Tab key to accept the entire suggestion. The gray text will become regular code and be inserted into your file. You can also click the Accept button if it appears in the suggestion popup.
3

Accept partial suggestions

To accept only part of a suggestion, use Ctrl+→ (or Cmd+→ on Mac) to accept the suggestion word by word. This allows you to take only the parts you need while rejecting the rest. Press Ctrl+Alt+→ to accept the next line only.
Partial acceptance is useful when Copilot suggests more code than you need.
4

Reject suggestions

Press the Esc key to dismiss the current suggestion without accepting it. You can also simply continue typing to override the suggestion. The gray suggestion text will disappear and won't be inserted into your code.
Continuing to type naturally replaces suggestions, so you don't always need to explicitly reject them.
5

Browse alternative suggestions

Use Alt+] to see the next alternative suggestion or Alt+[ to see the previous one. You can cycle through multiple suggestions before deciding which one to accept. The number of available alternatives is usually shown in the suggestion popup.
Copilot often provides 2-10 alternative suggestions, so explore your options before accepting.
6

Use the Copilot suggestions panel

Open the suggestions panel by pressing Ctrl+Enter (or using the command palette and searching for GitHub Copilot: Show suggestions). This displays all available suggestions in a separate panel where you can preview and select from multiple options at once.
The panel view is helpful when you want to compare several suggestions side by side.
7

Configure suggestion behavior

Access Copilot settings through your editor's settings menu or command palette. You can adjust suggestion delay, auto-trigger behavior, and suggestion display preferences. Look for GitHub Copilot in your editor's extension settings.
Adjust the suggestion delay if you find suggestions appearing too quickly or slowly while typing.

Common Issues & Troubleshooting

Suggestions not appearing

Check that Copilot is enabled in your editor status bar and verify your subscription is active. Try refreshing the editor or restarting the Copilot extension through the command palette.

Tab key not accepting suggestions

Ensure no other extensions are overriding the Tab key behavior. Check your editor's keybinding settings and look for conflicts with the editor.action.inlineSuggest.commit command.

Poor quality suggestions

Provide more context by adding descriptive comments or ensuring your file has proper imports and type definitions. Copilot works better with clear context about what you're trying to accomplish.

Suggestions appearing too frequently

Adjust the suggestion trigger settings in Copilot preferences. You can increase the delay or disable automatic triggering and use Alt+\ to manually trigger suggestions when needed.

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official GitHub Copilot website before purchasing.