A Visual Studio Code extension that allows you to compare two texts side-by-side with difference highlighting and VS Code diff view integration.
✨ Features
📝 Side-by-Side Comparison: Compare two texts in a clean, organized interface
🔍 Difference Detection: Automatically detects and counts difference blocks between texts
📊 Statistics: Shows total lines and words for each text
🔢 Line Numbers: Visual line numbers for easy reference
📁 File Support: Load entire files or selected text into comparison boxes
🎯 VS Code Diff Integration: Open differences in VS Code's built-in diff editor
⌨️ Keyboard Shortcut: Quick access with Ctrl+Shift+D (or Cmd+Shift+D on Mac)
🎨 VS Code Theme Integration: Automatically adapts to your VS Code theme
🚀 Installation
Open VS Code
Go to Extensions section (Ctrl+Shift+X or Cmd+Shift+X)
Search for "Diff Checker"
Click "Install"
📖 How to Use
Open Diff Checker
There are two ways to open the Diff Checker:
Keyboard Shortcut: Press Ctrl+Shift+D (Windows/Linux) or Cmd+Shift+D (Mac)
Command Palette: Press F1 or Ctrl+Shift+P and type "Show Diff Checker"
Compare Texts
Manual Input: Type or paste text directly into the "Original text" and "Changed text" boxes
Load from Editor:
Click "↑ Open file" button above each textbox to load the active file
Or use commands "Load Selection to Text A" / "Load Selection to Text B" to load selected text
Smart Loading: When opening Diff Checker with text selected:
If both boxes are empty → loads into "Original text"
If "Original text" has content → loads into "Changed text"
Find Differences
Click the "Find difference" button
The extension will:
Show if texts are identical or different
Display the number of difference blocks found
Show total lines and words for each text
View Differences in VS Code
After finding differences, click "See Differences" link
VS Code's built-in diff editor opens in column 1
The Diff Checker panel stays in column 2 for reference
Reset
Click "Reset" button below each textbox to clear its content
Resets line count, word count, and height
⚙️ Features Details
Difference Blocks
The extension counts "difference blocks" - contiguous sections of changes between the two texts. Each block can contain multiple lines that were added or removed.
Example:
If you have 2 separate sections with changes, it shows "2 difference blocks found"
This is more meaningful than counting individual lines, as it shows how many distinct areas differ
Statistics
Each textbox displays:
Left side: Total number of lines (e.g., "10 lines")
Right side: Total number of words (e.g., "45 words")
File Loading
"↑ Open file" button: Loads the entire active file when no text is selected
With selection: Loads only the selected text
Last active file: Remembers the last file you were working on, so "Open file" uses that file even if the preview panel has focus