Hey there, developers! Andrea Griffiths here, Senior Developer Advocate at GitHub.
Have you ever spent hours tediously hunting down every instance where you need to update code after changing a variable name or modifying a function signature? If you're like me, you know that refactoring can sometimes feel like searching for needles in a haystack frustrating, time-consuming, and prone to errors.
That's why I'm incredibly excited to share our latest GitHub Checkout episode featuring a game-changing VS Code feature: Next Edit Suggestions.
What is Next Edit Suggestions?
Next Edit Suggestions (NES) is the newest capability from GitHub Copilot that fundamentally transforms how we edit and refactor code. Unlike standard completions that help you write new code, NES anticipates what you need to change in your existing code.
Here's what makes it special:
- Predicts intent: NES understands what you're trying to accomplish when you make a change
- Anticipates edits: Automatically suggests related changes across your project
- Maintains context: Keeps track of semantic relationships between different parts of your code
- Streamlines workflow: Keeps you in flow without needing to manually hunt down every reference
See It In Action
In our latest GitHub Checkout episode, I sat down with Brigit Murtaugh, Senior Product Manager for VS Code, for a deep dive into how Next Edit Suggestions works.
We demonstrate real-world scenarios where NES shines:
- Changing intent: Converting a 2D point class to 3D by simply editing the class name
- Adding logic: Updating code throughout your project after adding new functionality
- Fixing logic: Updating all references when changing variable types or function behaviors
- Refactoring: Renaming variables, functions, or parameters and having all references update
What impressed me most during our demo was how fast the suggestions appear and how intelligent they areβNES doesn't just find matching text, it understands the semantics of your code.
How to Enable It
Getting started with Next Edit Suggestions is super simple:
- Make sure you have GitHub Copilot installed
- In VS Code settings, check the box for "Copilot Next Edit Suggestions"
- For the best experience, use VS Code Insiders with the Copilot and Copilot Chat pre-release extensions
Watch the Full Episode
I encourage you to check out the full episode to see all the mind-blowing examples of how Next Edit Suggestions can transform your development workflow. Trust me, once you see it in action, you'll wonder how you ever lived without it!
Watch GitHub Checkout: Next Edit Suggestions now β
Share Your Experience
After you've had a chance to try Next Edit Suggestions, I'd love to hear about your experience. What type of edits has it helped you with the most? How has it changed your workflow?
The team is actively collecting feedback, so don't hesitate to share your thoughts on the VS Code Copilot GitHub repo.
Happy coding (and effortless refactoring)!
Andrea
Top comments (0)