Generate, refactor, and update code in-place inside your active editor buffer.
Inline Edit is the fastest way to make targeted adjustments to your code without opening a chat window. By highlighting a section of code and pressing Ctrl+K (or Cmd+K on macOS), you summon a lightweight prompt box that edits the selected lines in-place.
Follow these steps to run an inline refactor:
Highlight the specific lines of code you want to edit. If you select nothing, the AI will generate new code at your current cursor position.
Press Ctrl+K (Windows/Linux) or Cmd+K (macOS) to open the inline input panel.
Type what you want to accomplish (e.g. "convert this function to async and add try/catch handling") and press Enter.
CoderX displays a side-by-side git diff showing precisely what lines will be removed (red highlights) and added (green highlights).
Accept the code using shortcuts (Ctrl+Enter or click Accept) or reject them to revert back to your original code.
Manage inline edit proposals quickly using editor hotkeys:
| Action | Windows / Linux | macOS |
|---|---|---|
| Open Inline Edit | Ctrl+K | Cmd+K |
| Accept Proposal | Ctrl+Enter | Cmd+Enter |
| Reject Proposal | Escape | Escape |
| Toggle Diff View | Ctrl+Shift+D | Cmd+Shift+D |
| Next Difference | F7 | F7 |
If your inline edit modifies an import signature or function parameter, CoderX can automatically recommend updating the references in related files:
[!TIP] After accepting an inline edit that alters API contracts, check the Refactor Recommendations toast. Clicking Accept All will apply the corresponding updates to dependent imports in other files.