Github copilot is an AI pair programming tools, which can be integrated with your IDEs. This will give you AI based autocomplete suggestions, code fixes, unit tests etc.
You can visit https://docs.github.com/en/copilot to get the details about copilot
Currently copilot will only be available on these platforms/IDEs/tools. Azure Data Studio, Jetbrains, VIM/NeoVIm, Visual Studio and in Visual studio code.
Here I am using VS code. let’s learn.
First you have to install or download VS code in your machine. After installing
- Search for copilot extension in Extension tab.
- Install copilot and copilot chat
- If you are using an enterprise authentication, you may need Win CA or Mac CA extensions as well.
After installing above, restart the VS code and Authenticate your copilot with your github credentials.
Once it’s successfully installed, you should be able to see an icon on right side bottom side of VS code, which will show ready status of copilot in your VS code.
Here are some shortcut keys that you can use with VS code.
For windows
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 |
For Mac
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 |
For Linux
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 |