« Github Copilot » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 26 : | Ligne 26 : | ||
{| class="wikitable wtp wtmono1" | {| class="wikitable wtp wtmono1" | ||
! Command | ! Command | ||
! Description | |||
|- | |||
| /doc || add documentation comment | |||
|- | |||
| /explain || | |||
|- | |||
| /fix || propose a fix for problems | |||
|- | |||
| /help || | |||
|- | |||
| /optimize || analyze and improve running time | |||
|- | |||
| /tests || create unit tests | |||
|} | |||
{| class="wikitable wtp wtmono1" | |||
! Reference code | |||
! Description | ! Description | ||
|- | |- |
Dernière version du 10 juillet 2024 à 10:18
Links
Shortcuts
Shortcut | Description |
---|---|
Tab | accept the suggestion |
Alt + . | display the next suggestion |
Alt + , | display the previous suggestion |
Esc | reject the suggestion |
Generating code suggestions from comments
// describe something you want to do using natural language within a comment, and GitHub Copilot will suggest the code to accomplish your goal |
GitHub Copilot Chat
View → GitHub Copilot Chat
Command | Description |
---|---|
/doc | add documentation comment |
/explain | |
/fix | propose a fix for problems |
/help | |
/optimize | analyze and improve running time |
/tests | create unit tests |
Reference code | Description |
---|---|
# Active document | focus on the code that's currently visible in the editor |
# Selection | focus on the selected code |
# | focus on a specific file |
Configuring GitHub Copilot in your environment
Installation in Visual Studio
GitHub Copilot is installed as a component with Visual Studio installer