Next Edit
Use Next Edit to flow through complex changes across your codebase. Cut down the time you spend on repetitive work like refactors, library upgrades, and schema changes.
About Next Edit
Next Edit helps you complete your train of thought by suggesting changes based on your recent work and other context. You can jump to the next edit and quickly accept or reject the suggested change with a single keystroke.
Using Next Edit
When Next Edit has a suggestion available, you will see a gutter icon and a summary of the change in gray at the end of the line. To jump to the next suggestion, press Cmd/Ctrl ; and after reviewing the change, press Enter to accept or Backspace to reject. If there are multiple changes, press Cmd/Ctrl ; to accept and go to the next suggestion.
By default, Next Edit will briefly highlight which parts of the existing code will change before applying the change and highlighting the new code. Use Undo (Cmd/Ctrl Z) and Redo (Cmd Shift Z/Ctrl Y) to manually review the change. You can configure this behavior in your Augment extension settings.
Keyboard Shortcuts
Action | Default shortcut |
---|---|
Go to next | Cmd ; |
Go to previous | Cmd Shift ; |
Accept suggestion | Enter |
Reject suggestion | Backspace |
Next Edit Indicators And Actions
There are several indicators to let you know Next Edits are available:
- Editor Title Icon (Top Right): Changes colors when next edits are available. Click on the icon to open the next edit menu for additional actions like enabling/disabling the feature or accessing settings.
- Gutter Icon (Left) - Indicates which lines will be changed by the suggestion and whether it will insert, delete or change code.
- Grey Text (Right) - appears on the line with the suggestion on screen with a brief summary of the change and the keybinding to press (typically Cmd/Ctrl ;).
- Hint Box (Bottom Left) - appears when the next suggestion is off screen with brief summary of the change and the keybinding to press (typically Cmd/Ctrl ;).
The tooltip also presents a few actions as icons:
- Toggles showing diffs for suggestions in the tooltip.
- Opens Next Edit settings.
Next Edit Settings
You can configure Next Edit settings in your Augment extension settings. To open Augment extension settings, either navigate to the option through the pencil menu, or open the Augment Commands panel by pressing Cmd/Ctrl Shift A and select ⚙ Edit Settings.
Here are some notable settings:
- Augment > Next Edit: Enable Background Suggestions: Use to enable or disable the feature.
- Augment > Next Edit: Enable Global Background Suggestions: When enabled, Next Edits will suggest changes in other files via the hint box.
- Augment > Next Edit: Enable Auto Apply: When enabled, Next Edits will automatically apply changes when you jump to them.
- Augment > Next Edit: Show Diff in Hover: When enabled, Next Edits will show a diff of the suggested change in the hover.
- Augment > Next Edit: Highlight Suggestions in The Editor: When enabled, Next Edits will highlight all lines with a suggestion in addition to showing gutter icons and grey text.