A minimalistic Visual Studio Code extension that lets you quickly compare clipboard contents as the "After" and the active file as the "Before" — opposite behavior of VS Code’s built-in "Compare Active File with Clipboard."
Perfect for reviewing updates from AI tools like ChatGPT and generating clean, meaningful diffs.
- ✅ Clipboard = After (additions/changes in green)
- ❌ Active file = Before (deletions/original in red)
- ⚡ Instant command or hotkey-based launch
- 🎯 Designed for fast code reviews, patch pasting, and AI-assisted workflows
From a local .vsix
package:
code --install-extension ./compare-clipboard-with-active-file-0.1.0.vsix
Tip:
You can build your own .vsix
(see Build section) or install manually later when published.
- Copy text you want to compare into your clipboard.
- Open the target file in VS Code.
- Trigger the command:
- Open the Command Palette (
Ctrl+Shift+P
orCmd+Shift+P
) → search for Compare Clipboard with Active File, or - Press the shortcut
Cmd+K Shift+C
(Mac) or similar on Windows/Linux.
- Open the Command Palette (
VS Code’s built-in diff view will open with the clipboard vs. file.
To build a .vsix
yourself:
npm install
npm run build
Note: You must have
vsce
installed:npm install -g @vscode/vsce
- Publish on VS Code Marketplace
Distributed under the MIT License.
Built mostly with 🖤 by our 🤖 overlords.