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: README.md
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,35 @@ The `:ClaudeCodeAdd` command allows you to add files or directories directly by
130
130
-**Validation**: Checks that files and directories exist before adding, validates line numbers
131
131
-**Flexible**: Works with both individual files and entire directories
132
132
133
+
## Working with Diffs
134
+
135
+
When Claude proposes changes to your files, the plugin opens a native Neovim diff view showing the original file alongside the proposed changes. You have several options to accept or reject these changes:
136
+
137
+
### Accepting Changes
138
+
139
+
-**`:w` (save)** - Accept the changes and apply them to your file
140
+
-**`<leader>da`** - Accept the changes using the dedicated keymap
141
+
142
+
You can edit the proposed changes in the right-hand diff buffer before accepting them. This allows you to modify Claude's suggestions or make additional tweaks before applying the final version to your file.
143
+
144
+
Both methods signal Claude Code to apply the changes to your file, after which the plugin automatically reloads the affected buffers to show the updated content.
145
+
146
+
### Rejecting Changes
147
+
148
+
-**`:q` or `:close`** - Close the diff view to reject the changes
149
+
-**`<leader>dq`** - Reject changes using the dedicated keymap
150
+
-**`:bdelete` or `:bwipeout`** - Delete the diff buffer to reject changes
151
+
152
+
When you reject changes, the diff view closes and the original file remains unchanged.
153
+
154
+
### Accepting/Rejecting from Claude Code Terminal
155
+
156
+
You can also navigate to the Claude Code terminal window and accept or reject diffs directly from within Claude's interface. This provides an alternative way to manage diffs without using the Neovim-specific keymaps.
157
+
158
+
### How It Works
159
+
160
+
The plugin uses a signal-based approach where accepting or rejecting a diff sends a message to Claude Code rather than directly modifying files. This ensures consistency and allows Claude Code to handle the actual file operations while the plugin manages the user interface and buffer reloading.
0 commit comments