3 Quick Tips to Jumpstart Your Journey with GitHub Copilot

Tim Williams
2 min readApr 22, 2023

--

The more mature the career of software development becomes, the more it converges with other skilled trades like mechanic. In many skilled trades the effectiveness of the individual contributor is directly related to their skill with and the quality of their tools. A master tradesman is deeply experienced and highly affective with their tools.

It is quickly becoming apparent that the next killer tool in the Software Developer’s toolkit will be generative AI. The first serious contender on the scene is Github Copilot. Here is a quick guide to getting started with this tool.

Install the GitHub Copilot Extension

To use GitHub Copilot, you’ll need to install the extension on your IDE. The GitHub Copilot extension is available for Visual Studio Code, which is a popular, free, and open-source code editor. Follow these steps to install it:

  1. Open Visual Studio Code.
  2. Click on the Extensions view icon, or press Ctrl+Shift+X to open the Extensions tab.
  3. In the search bar, type “GitHub Copilot” and press Enter.
  4. Click on the GitHub Copilot extension and then click the Install button.
  5. Once installed, you will be prompted to sign in to your GitHub account or create one if you haven’t already.

Understand How to Use GitHub Copilot’s Autocomplete Feature

GitHub Copilot is designed to provide context-aware code suggestions while you’re coding. Here’s how to make the most of its autocomplete feature:

  1. Start typing your code as you normally would.
  2. GitHub Copilot will automatically suggest relevant code completions as you type. These suggestions will appear as light gray text inline with your cursor.
  3. Press Tab or Enter to accept the suggested code completion.
  4. If you want to explore alternative suggestions, press Ctrl+Space (or Cmd+Space on macOS) to open the suggestion list.
  5. Navigate through the list using the arrow keys and press Enter to select the desired suggestion.

Request Specific Code Examples and Functions

GitHub Copilot can also generate specific code examples or functions based on your comments or code. Here’s how:

  1. Write a comment describing the code or function you’d like GitHub Copilot to generate. Make sure to provide enough context and be clear about your requirements.
  2. Press Enter to start a new line of code after the comment.
  3. GitHub Copilot will provide a code suggestion based on your comment. If the suggestion meets your requirements, press Tab or Enter to accept it.
  4. If the initial suggestion doesn’t match your requirements, press Ctrl+Space (or Cmd+Space on macOS) to explore alternative suggestions. You can cycle through the list and pick the one that best suits your needs.

After getting the hang of the basic functionality, the more you use Copilot, like any other tool, the more effective you become with it.

--

--

Tim Williams
Tim Williams

Written by Tim Williams

I am a Web Developer passionate about new technologies, as well as time tested best practices (here’s looking at you Uncle Bob).

No responses yet