How to accept or reject code suggestions on GitHub Copilot
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
Trigger Copilot suggestions
Accept the entire suggestion
Accept partial suggestions
Reject suggestions
Browse alternative suggestions
Use the Copilot suggestions panel
Configure suggestion behavior
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.