Inline Edit
View and accept AI-proposed code changes directly inside the editor with green ghost-text highlighting — no separate diff tab required.
Overview
Inline Edit mode renders proposed code changes as ghost text overlaid directly on the source file. Additions are highlighted in green, giving you an at-a-glance preview without switching to a diff tab. When satisfied, accept with a single keystroke.
Enabling Inline Edit Mode
- Open Settings (
Cmd+,/Ctrl+,) - Search for
misarCode inlineEditMode - Toggle Misar Code: Inline Edit Mode
{
"misarCode.inlineEditMode": true
}
When inline edit mode is off, the agent uses the standard diff tab view (left: original read-only, right: proposed changes). See the Diff Review page for details on that workflow.
Accepting and Rejecting Changes
| Action | Keyboard Shortcut | Alternative |
|--------|-------------------|-------------|
| Accept changes | Ctrl+Enter | Command Palette → Misar Code: Accept Inline Edit |
| Reject changes | Escape | Command Palette → Misar Code: Reject Inline Edit |
Accepting saves the file if misar.autosaveOnAccept is enabled (default: true).
How It Works
After the agent processes your request, it computes a diff between the current file and the proposed version.
Added lines appear in green ghost text at the correct line positions in the editor. Removed lines are shown with strikethrough.
Scroll through the file normally. The surrounding code is fully readable so you can judge the change in context.
Press Ctrl+Enter to apply the changes, or Escape to discard them. The ghost text is removed in either case.
When to Use Inline Edit vs. Diff Review
| Scenario | Recommended Mode | |----------|-----------------| | Small, targeted edits (1–20 lines) | Inline Edit | | Large rewrites or multi-section changes | Diff Review (standard) | | Reviewing a complete file replacement | Diff Review (standard) | | Quick function-level tweaks | Inline Edit |
You can toggle between modes at any time from settings. The choice does not affect what the agent proposes — only how the proposal is presented to you.
Activating via /inline-edit
Type /inline-edit in the chat to explicitly request inline edit mode for the current response, even if misarCode.inlineEditMode is disabled globally. This is useful for targeted single-block edits when you want the inline experience for just one request.
Configuration Reference
| Setting | Type | Default | Description |
|---------|------|---------|-------------|
| misarCode.inlineEditMode | boolean | false | Use inline ghost-text for proposed changes instead of a diff tab |
| misar.autosaveOnAccept | boolean | true | Auto-save the file when you accept an inline edit |