About GitHub Copilot in Visual Studio Code
If you use Visual Studio Code, GitHub Copilot can autocomplete code as you type. After installation, you can enable or disable GitHub Copilot, and you can configure advanced settings within Visual Studio Code or on GitHub.com.
Prerequisites
To configure GitHub Copilot in Visual Studio Code, you must install the GitHub Copilot plugin. For more information, see "Getting started with GitHub Copilot in Visual Studio Code."
Keyboard shortcuts for GitHub Copilot
You can use the default keyboard shortcuts in Visual Studio Code when using GitHub Copilot. Alternatively, you can rebind the shortcuts in the Keyboard Shortcuts editor using your preferred keyboard shortcuts for each specific command. You can search for each keyboard shortcut by command name in the Keyboard Shortcuts editor.
| Action | Shortcut | Command name |
|---|---|---|
| Accept an inline suggestion | Tab | editor.action.inlineSuggest.commit |
| Dismiss an inline suggestion | Esc | editor.action.inlineSuggest.hide |
| Show next inline suggestion | Option (⌥)+] | editor.action.inlineSuggest.showNext |
| Show previous inline suggestion | Option (⌥)+[ | editor.action.inlineSuggest.showPrevious |
| Trigger inline suggestion | Option (⌥)+\ | editor.action.inlineSuggest.trigger |
| Open GitHub Copilot (additional suggestions in separate pane) | Ctrl+Return | github.copilot.generate |
| Toggle GitHub Copilot on/off | No default shortcut | github.copilot.toggleCopilot |
| Action | Shortcut | Command name |
|---|---|---|
| Accept an inline suggestion | Tab | editor.action.inlineSuggest.commit |
| Dismiss an inline suggestion | Esc | editor.action.inlineSuggest.hide |
| Show next inline suggestion | Alt+] | editor.action.inlineSuggest.showNext |
| Show previous inline suggestion | Alt+[ | editor.action.inlineSuggest.showPrevious |
| Trigger inline suggestion | Alt+\ | editor.action.inlineSuggest.trigger |
| Open GitHub Copilot (additional suggestions in separate pane) | Ctrl+Enter | github.copilot.generate |
| Toggle GitHub Copilot on/off | No default shortcut | github.copilot.toggleCopilot |
| Action | Shortcut | Command name |
|---|---|---|
| Accept an inline suggestion | Tab | editor.action.inlineSuggest.commit |
| Dismiss an inline suggestion | Esc | editor.action.inlineSuggest.hide |
| Show next inline suggestion | Alt+] | editor.action.inlineSuggest.showNext |
| Show previous inline suggestion | Alt+[ | editor.action.inlineSuggest.showPrevious |
| Trigger inline suggestion | Alt+\ | editor.action.inlineSuggest.trigger |
| Open GitHub Copilot (additional suggestions in separate pane) | Ctrl+Enter | github.copilot.generate |
| Toggle GitHub Copilot on/off | No default shortcut | github.copilot.toggleCopilot |
Rebinding keyboard shortcuts
If you don't want to use the default keyboard shortcuts in Visual Studio Code when using GitHub Copilot, you can rebind the shortcuts in the Keyboard Shortcuts editor using your preferred keyboard shortcuts for each specific command.
- Click the File menu, click Preferences, then click Keyboard Shortcuts.

- In the "Keyboard Shortcuts" editor, search for the command name of the keyboard shortcut you want to change.

- Next to the command you want to change, click the pencil icon.

- Type the keystrokes you want to use for the command, then press Enter/Return.

Enabling or disabling GitHub Copilot
You can enable or disable GitHub Copilot from within Visual Studio Code. The GitHub Copilot status icon in the bottom panel of the Visual Studio Code window indicates whether GitHub Copilot is enabled or disabled. When enabled, the background color of the icon will match the color of the status bar. When disabled, the background color of the icon will contrast with the color of the status bar.
-
To enable or disable GitHub Copilot, click the status icon in the bottom panel of the Visual Studio Code window.

-
If you are disabling GitHub Copilot, you will be asked whether you want to disable suggestions globally, or for the language of the file you are currently editing.
- To disable suggestions from GitHub Copilot globally, click Disable Globally.
- To disable suggestions from GitHub Copilot for the specified language, click Disable for LANGUAGE.

Enabling or disabling inline suggestions
You can choose to enable or disable inline suggestions for GitHub Copilot in Visual Studio Code.
- In the File menu, navigate to Preferences and click Settings.

- In the left-side panel of the settings tab, click Extensions and then select Copilot.
- Under "Inline Suggest:Enable", select or deselect the checkbox to enable or disable inline suggestions.
Enabling or disabling GitHub Copilot for specific languages
You can specify which languages you want to enable or disable GitHub Copilot for.
-
From the Visual Studio Code, click the Extensions tab, then navigate to the Copilot section. For more information, see "Enabling and disabling inline suggestions."
-
Under "Enable or disable Copilot for specified languages", click Edit in settings.json.
-
In the settings.json file, add or remove the languages you want to enable or disable GitHub Copilot for. For example, to enable Python in GitHub Copilot, add
"python": trueto the list, ensuring there is a trailing comma after all but the last list item.{ "editor.inlineSuggest.enabled": true, "github.copilot.enable": { "*": true, "yaml": false, "plaintext": false, "markdown": true, "javascript": true, "python": true } }
Configuring GitHub Copilot settings on GitHub.com
Once you have an active GitHub Copilot trial or subscription, you can adjust GitHub Copilot settings for your personal account on GitHub. The settings apply anywhere that you use GitHub Copilot. You can configure the suggestions that GitHub Copilot offers and how GitHub uses your telemetry data.
Enabling or disabling duplication detection
-
In the upper-right corner of any page, click your profile photo, then click Settings.

-
In the left sidebar, click Copilot.
-
Under Suggestions matching public code, select the dropdown menu and click Allow to allow suggestions matching public code, or Block to block suggestions matching public code.

-
To confirm your new settings, click Save.
Enabling and disabling telemetry
-
In the upper-right corner of any page, click your profile photo, then click Settings.

-
In the left sidebar, click Copilot.
-
To allow or prevent GitHub using your telemetry data, next to Allow GitHub to use my telemetry for product improvements, select or deselect the checkbox.

-
To confirm your new settings, click Save.

