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

How to Optimize Your Workflow with AI Tools in Just 30 Minutes

How to Optimize Your Workflow with AI Tools in Just 30 Minutes If you're like most indie hackers or solo founders, you're constantly looking for ways to streamline your workflow an

May 13, 20264 min read
Ai Coding Tools

Bolt.new vs GitHub Copilot: Which is Better for Real-Time Collaboration?

Bolt.new vs GitHub Copilot: Which is Better for RealTime Collaboration? As a solo founder or indie hacker, we often find ourselves juggling multiple tasks, and coding can be one of

May 13, 20263 min read
Ai Coding Tools

5 Mistakes Solo Developers Make with AI Coding Tools

5 Mistakes Solo Developers Make with AI Coding Tools As a solo developer, diving into AI coding tools can feel like opening Pandora's box. With promises of increased productivity a

May 13, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make You More Productive in 2026

5 AI Coding Tools That Make You More Productive in 2026 As a solo developer or indie hacker, finding ways to boost productivity can feel like an uphill battle. In 2026, the landsca

May 13, 20264 min read
Ai Coding Tools

Cursor vs Codeium: Which AI Coding Tool is the Best for Indie Hackers?

Cursor vs Codeium: Which AI Coding Tool is the Best for Indie Hackers? As indie hackers, we’re always on the lookout for tools that can save us time and make coding easier. In 2026

May 13, 20263 min read
Ai Coding Tools

How to Use GitHub Copilot to Write Code 5x Faster in 30 Minutes

How to Use GitHub Copilot to Write Code 5x Faster in 30 Minutes If you're a solo founder or indie hacker trying to ship code quickly, you're likely familiar with the struggle of ba

May 13, 20264 min read