You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blogs/2025/next-edit-suggestions.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,20 @@ Author: Brigit Murtaugh, Burke Holland
10
10
# Copilot Next Edit Suggestions (preview)
11
11
Feburary 5, 2025 by [Brigit Murtaugh](https://github.com/bamurtaugh), [Burke Holland](https://github.com/burkeholland)
12
12
13
-
GitHub Copilot code completions are great at autocomplete - they can predict and suggest the code that was in your head, without you even having to ask for it. But since most coding activity is editing existing code, it's a natural evolution of completions to also help with edits. Edits are often not made in isolation - there's a logical flow of what edits need to be made as you iterate on your project - and they can happen both at your current cursor location and further away.
13
+
GitHub Copilot code completions are great at autocomplete - they can predict and suggest the code that was in your head, without you even having to ask for it. But since most coding activity is editing existing code, it's a natural evolution of completions to also help with edits.
14
14
15
-
We're excited to announce the preview of **Copilot Next Edit Suggestions** (aka "Copilot NES"), which is this evolution of Copilot completions.
15
+
Edits are often not made in isolation - there's a logical flow of what edits need to be made as you iterate on your project - and they can happen both at your current cursor location and further away.
16
16
17
-
Based on the edits you're making, NES both predicts the location of the next edit you'll want to make and what that edit should be. NES helps you stay in the flow, suggesting future changes relevant to your current work, and you can simply `kbstyle(Tab)` to quickly navigate and accept suggestions.
17
+
We're excited to announce the preview of **Copilot Next Edit Suggestions** (aka "Copilot NES"), which is this evolution of Copilot completions.
18
18
19
19
<!-- TODO: Video about NES from Olivia -->
20
20
21
+
Based on the edits you're making, Copilot NES both predicts the location of the next edit you'll want to make and what that edit should be. NES helps you stay in the flow, suggesting future changes relevant to your current work, and you can simply `kbstyle(Tab)` to quickly navigate and accept suggestions.
22
+
21
23
You may have seen [previous work from the GitHub Next Team on NES](https://githubnext.com/projects/copilot-next-edit-suggestions/) – this is the evolution of the Next Team's great work, now part of the existing GitHub Copilot extensions.
22
24
23
25
## Getting your first suggestions
24
-
You can enable NES via the VS Code setting `setting(github.copilot.nextEdits.enabled)`.
26
+
You can enable Copilot NES via the VS Code setting `setting(github.copilot.nextEdits.enabled)`.
25
27
26
28
> [!NOTE]
27
29
> If you are a Copilot Business or Enterprise user, an administrator of your organization must opt in to the use of previews of Copilot features, in addition to you setting `setting(github.copilot.nextEdits.enabled)` in your editor.
@@ -32,7 +34,7 @@ Like completions, all you need to do to start getting suggestions from NES is to
32
34
33
35
When you're presented with an edit suggestion, you can navigate to it with the `kbstyle(Tab)` key and then accept it with the `kbstyle(Tab)` key again, saving you time to find the next relevant edit (no manual searching through files or references required).
34
36
35
-
An arrow in the gutter indicates if there is an edit suggestion available. If an edit suggestion is below the current editor view, the arrow will point down instead of right.
37
+
An arrow in the gutter indicates if there is an edit suggestion available. If an edit suggestion is below the current editor view, the arrow will point down instead of right:
36
38

37
39
38
40
<!--  -->
@@ -47,17 +49,17 @@ Suggestions may span a single symbol, an entire line, or multiple lines, dependi
47
49
## Example scenarios
48
50
Copilot NES is your AI companion as you make changes that may cascade throughout your file or project, and you'll see it shine in a variety of scenarios.
49
51
50
-
Our development team has been self-hosting on NES for a while, and one of our engineers remembers one of his first "aha!" moments with NES. He was writing a condition along the lines of `if (something !== 'a' || something !== 'b')`. NES caught that this statement would always evaluate to true (thanks De Morgan's Law!) and suggested replacing `||` with `&&`:
52
+
Our development team has been self-hosting on NES for a while, and one of our engineers remembers one of his first "aha!" moments with NES. He was writing a condition along the lines of `if (something !== 'a' || something !== 'b')`. NES caught that this statement would always evaluate to true (thanks De Morgan's Law!) and suggested replacing `||` with `&&` to make the code valid:
51
53

52
54
53
-
The following are a few more examples where NES shines.
55
+
The following are just a few more examples where NES shines.
54
56
55
57
**Catching and correcting mistakes:** Mistakes are a natural part of writing code, and Copilot NES is there to help catch them (sometimes before you even realize the mistake was there!).
56
58
57
59
NES helps with small mistakes like typos - maybe you were coding quickly in the zone, and you wrote `conts` instead of `const`:
58
60

59
61
60
-
NES can also help with more challenging mistakes in logic, like an evaluation that should've used `>` instead of `<`:
62
+
NES can also help with more challenging mistakes in logic, like a return statement that should've used `<=` instead of `>`:
61
63

62
64
63
65
**Changing intent:** Copilot NES suggests changes that match a change in intent. For example, changing a class from `Point` to `Point3D` will lead to a suggestion to add a `z` variable to the class definition and to the distance calculation:
@@ -71,14 +73,14 @@ It could also be more complex: if you added a new command to your VS Code extens
71
73
<!--  -->
72
74
<!--  -->
73
75
74
-
**Refactoring:** If you use a new name or naming pattern, Copilot suggests to rename subsequent variables similarly.
76
+
**Refactoring:** If you use a new name or naming pattern, Copilot NES suggests to rename subsequent variables similarly.
75
77
76
78
## Share your feedback
77
-
NES is rapidly evolving, and we can't wait to get your feedback via issues in [our repo](https://github.com/microsoft/vscode-copilot-release) – this will be instrumental to improving the experience.
79
+
Copilot NES is rapidly evolving, and we can't wait to get your feedback via issues in [our repo](https://github.com/microsoft/vscode-copilot-release) – this will be instrumental to improving the experience.
78
80
79
81
Please be sure to use [VS Code Insiders](https://code.visualstudio.com/insiders/) and the pre-release version of the [GitHub Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat) to get all of the latest features and fixes.
80
82
81
-
You can read our [full NES docs](aka.ms/gh-copilot-nes-docs) for more information and scenarios as we expand the NES experience.
83
+
You can read our [full NES docs](https://aka.ms/gh-copilot-nes-docs) for more information and scenarios as we expand the NES experience.
82
84
83
85
We're excited about NES as a next step in an AI where the LLM anticipates what you'll need to do next - the best prompt is the one that you don't have to write. We hope you're excited too and look forward to seeing what you build!
0 commit comments