Copilot evolves: Visual Studio 2022 introduces ‘Next Edit Suggestions’ for smarter code editing
Microsoft has launched Next Edit Suggestions (NES) in Visual Studio 2022 version 17.14, extending GitHub Copilot's capabilities beyond code generation to logical code editing by anticipating your next move anywhere in the file. NES tracks your recent edits and offers predictive insertions, deletions, or replacements, helping streamline refactoring, syntax updates, and variable logic changes with intuitive keyboard or gutter navigation.
How to enable it: Head to Tools > Options > GitHub > Copilot > Copilot Completions and check "Enable Next Edit Suggestions."
How it works: When Copilot detects an edit opportunity, it displays the suggestion in a diff view — with red for your original code and green for Copilot’s improved version. You’ll see exactly what’s being changed or removed.
Working with edits on different lines: If the edit is on a line you're not currently on, Copilot will prompt you to Tab to navigate to it. The arrow in the hint bar shows where the next edit is, so you no longer need to hunt for changes manually.
Accepting edits: Once you're on the suggested line, press Tab to accept the edit seamlessly.
Prefer clicking over keyboard shortcuts? Keep an eye out for the arrow in the gutter—it opens the edit suggestion menu, so you can review and apply changes with your mouse.