Ai Coding Tools

How to Use GitHub Copilot for Real-Time Code Suggestions in 2 Hours

By BTW Team4 min read

How to Use GitHub Copilot for Real-Time Code Suggestions in 2 Hours

As indie hackers and solo founders, we often find ourselves wrestling with the complexities of coding. Whether you're a seasoned developer or just starting, the prospect of writing code can feel daunting. That's where GitHub Copilot comes in. In 2026, Copilot has evolved into a powerful AI coding assistant that offers real-time code suggestions, making your coding journey smoother. However, many still wonder: how do you actually leverage this tool effectively?

In this guide, I’ll walk you through setting up and using GitHub Copilot within 2 hours, so you can start coding smarter, not harder.

Prerequisites: What You Need Before Starting

Before diving in, you’ll need a few things:

  • GitHub Account: Sign up for a free account if you don't have one already.
  • Visual Studio Code (VS Code): This is the primary IDE that works seamlessly with Copilot. Download and install it from here.
  • GitHub Copilot Subscription: As of 2026, GitHub Copilot costs $10/month or $100/year, with a free trial available for the first 30 days.

Step 1: Setting Up GitHub Copilot

  1. Install VS Code: Once you have VS Code installed, open it.
  2. Install the Copilot Extension:
    • Go to the Extensions view by clicking on the square icon in the sidebar.
    • Search for "GitHub Copilot" and click "Install".
  3. Sign In to GitHub: After installation, you will be prompted to sign in to your GitHub account. Follow the on-screen instructions.
  4. Enable Copilot: Once signed in, you may need to enable Copilot in your settings. Go to Preferences > Settings > Extensions > GitHub Copilot and toggle it on.

Expected Output: You should see a new Copilot icon in your sidebar, indicating that it’s ready to assist you.

Step 2: Writing Your First Code with Copilot

Now that Copilot is set up, let's write some code together. This step will take about 30 minutes.

  1. Create a New File: Start a new JavaScript file in VS Code.
  2. Write a Comment: Begin by typing a comment that describes what you want to achieve. For example:
    // Function to calculate the factorial of a number
    
  3. Trigger Copilot Suggestions: After writing the comment, hit "Enter". Copilot will automatically suggest code based on your comment. You can accept the suggestion by hitting "Tab".

Expected Output: You should see Copilot generate a function that calculates the factorial based on your comment.

Step 3: Fine-Tuning Suggestions

Copilot's suggestions may not always be perfect. Here's how to refine them effectively:

  1. Modify Your Comment: If the suggestion isn’t quite right, try rephrasing your comment for clarity.
  2. Use Inline Suggestions: As you type, Copilot will continuously suggest completions. You can cycle through options using the arrow keys.
  3. Learn from the Suggestions: Even if you don’t accept a suggestion, analyze the code to improve your own skills.

Troubleshooting Common Issues

If you encounter issues with Copilot, here are some common problems and solutions:

  • Copilot Not Suggesting: Ensure that you're connected to the internet and that the extension is enabled.
  • Suggestions Not Relevant: Try writing more specific comments or keywords; Copilot performs better with context.
  • Performance Issues: If VS Code feels slow, try disabling other extensions or restarting the application.

What's Next: Building a Simple Project

After getting comfortable with Copilot, consider building a small project to put your skills to the test. Here are a few ideas:

  • To-Do List App: Use Copilot to help structure your app and manage tasks.
  • Weather App: Query an API and let Copilot assist with parsing data.
  • Personal Portfolio: Create a website and use Copilot for HTML and CSS suggestions.

Conclusion: Start Here

In our experience, GitHub Copilot can significantly reduce coding time and help you learn on the go. By following this guide, you should be set up and ready to leverage real-time code suggestions in under 2 hours.

If you're serious about coding and want to maximize your productivity, GitHub Copilot is a worthwhile investment. Remember, the more you use it, the better it gets at understanding your coding style.

What We Actually Use

While we recommend GitHub Copilot for coding assistance, we also use other tools like:

  • Postman for API testing: Free, but $12/mo for advanced features.
  • Figma for design: Free tier available, $12/mo for teams.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read