How To - Use Github Co-Pilot in VSCode
Co-Pilot in VSCode has come a long way, and using it has never been easier. When you create a new file, you will see that it says to press CTRL+I to start Co-Pilot working for you. It is a good idea to remember this key combo, as you will need it each time you want to start the Co-Pilot process.
By default, Github Co-Pilot uses GPT-4o. Recently, Claude 3.5 Sonnet was added. I find Claude to be the best option and recommend switching it as shown here:
Tell Co-Pilot to do something. In my case, I told it to create a function to perform a specific task. When you hit enter, the first time, you will be asked to enable Claude.
After hitting enable, Claude will start typing out the code. If it looks good, hit “Accept”.
The co-pilot “prompt” will go away, and all that you will be left with is the code:
If you want to call on “Co-Pilot” again just re-type CTRL+I again.