Edit Modes
Cody provides two ways to edit code: Quick Edit (Alt+K) for fast, focused edits and Chat Panel Edit mode for editing through the chat interface with a conversational record.
Quick Edit (Alt+K)
Quick Edit provides a streamlined way to edit code without leaving your editor context. It opens a dedicated input dialog where you can describe your desired changes.
How to use Quick Edit
- Select the code you want to edit in your editor
- Press
Opt+K(macOS) orAlt+K(Windows/Linux) - Describe the change you want in the input dialog
- Optionally configure:
- Range selection
- Model selection
- Context items (@-mentions for files/symbols)
- Submit your instruction
Alternatively, right-click and select Cody → Edit Code. In VS Code, you can also use the 💡 lightbulb menu (Cmd+. or Ctrl+.).
Quick Edit workflow
Changes appear directly in your file with decorations showing what was modified. Code lenses appear above the changes with options to Accept, Undo, Retry, or Show Diff.
Keyboard shortcuts for these actions are available in VS Code (Alt+A, Alt+X, Alt+R) and JetBrains (with modifier variations on macOS).
Chat Panel Edit Mode
The Chat Panel Edit mode lets you request code edits through the chat interface. This is useful when you want a conversational record of your edits or prefer working within the chat panel.
How to use Chat Panel Edit mode
- Select the code you want to edit in your editor
- Open the Cody chat panel
- Click the mode selector dropdown and choose Edit
- Or use
Cmd+.(macOS) orCtrl+.(Windows/Linux) to cycle through modes
- Or use
- Type your edit instruction in the chat input
- Submit your message
Chat Panel Edit workflow
When you submit an edit request through chat:
- The diff is first displayed as a formatted message in the chat panel
- The same inline changes and code lenses appear in your file
- You have both a chat record AND inline edit controls
This mode provides visibility into what changes Cody proposes before they appear in your file, along with a persistent record of the edit in your chat history.
Comparing the two approaches
| Feature | Quick Edit (Alt+K) | Chat Panel Edit Mode |
|---|---|---|
| Interface | Dedicated dialog | Chat input |
| Configuration options | Range, model, @-mentions in dialog | Standard chat @-mentions |
| Result display | Inline changes only | Diff in chat + inline changes |
| Chat history | No record | Preserved in chat history |
| Keyboard shortcut | Alt+K / Opt+K | Toggle with Cmd+. / Ctrl+. |
| Best for | Quick, focused edits | Conversational editing with history |
When to use each mode
Use Quick Edit (Alt+K) when you:
- Want the fastest path to making an edit
- Don't need to keep a record of the change
- Prefer a dedicated, focused interface
Use Chat Panel Edit mode when you:
- Want to see the diff preview in chat before it's applied
- Need a conversational record of your edits
- Are already working in the chat panel
- Want to iterate on edits with follow-up messages
Shared functionality
Both edit modes use the same underlying system once the edit is triggered. This means you get:
- Inline decorations: Visual indicators showing added and removed code
- Code lenses: Accept, Undo, Retry, and Show Diff options above changes
- Model selection: Choose which LLM generates the edit
- Context awareness: Cody uses your codebase context to make informed edits
Client support
Edit modes are available in the following Cody clients:
- VS Code: Full support for Quick Edit and Chat Panel Edit mode
- JetBrains: Full support for Quick Edit and Chat Panel Edit mode
Visual Studio support for inline editing is experimental and has limited functionality compared to VS Code and JetBrains.
See the feature parity reference for detailed client comparison.