Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>N-Way Compare & MergeNew to Visual Studio Code? Get it now.
N-Way Compare & Merge

N-Way Compare & Merge

Amir Rafiq Bhat

|
3 installs
| (0) | Free
Compare and merge N files side-by-side simultaneously with synchronized scrolling and visual alignment.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

N-Way Compare & Merge

N-Way Compare & Merge Logo

Compare and merge multiple files side-by-side simultaneously inside VS Code.

Marketplace Version Installs License: MIT


N-Way Compare & Merge is a premium, high-performance Visual Studio Code extension designed for developers who need to compare and reconcile differences across multiple files ($N \ge 2$) simultaneously.

Unlike traditional 2-way diff editors, this extension renders $N$ scroll-synchronized columns side-by-side and allows you to select any column as the Base File to align the other files against.


⚡ Key Features

  • Side-by-Side N-Way Panels: Compare 2, 3, 4, or up to $N$ files simultaneously in a single view with horizontal group scrolling.
  • Vertical Synchronized Scrolling: Scroll any column, and all other columns automatically scroll in lockstep, keeping corresponding lines visually aligned.
  • Dynamic Alignment Engine:
    • Change the Base File via a dropdown menu in the header. The alignment is calculated on-the-fly relative to your new base.
    • Generates clear visual empty-line placeholders where text is added in other files relative to the base, ensuring alignments never drift.
  • Interactive N-Way Merging (New!):
    • One-Click Merge: Hover over any difference in comparison columns and click the merge arrows (→ or ←) to instantly copy that line's content into the Base column.
    • Free-Form Editing: The Base column is fully editable! Double-click or click directly on any code line in the Base column to type, correct, or adjust code.
    • Save Merge on Disk: Click Save Merge (or press Ctrl+S / Cmd+S inside the Webview) to write your merged code back to the physical file on your disk.
  • Sleek Themed Workspace: Natively integrates with VS Code color variables, adjusting automatically to dark, light, high-contrast, or custom themes.
  • Lightweight Code Highlighter: Built-in, high-speed regex highlighter that runs entirely offline.
  • Unified Text Search: Search/filter text across all files with highlighted matches.

🛠 How to Use N-Way Compare & Merge

Direct Selection (Fastest)

  1. Select 2 or more files in your VS Code Explorer (using Ctrl+Click or Shift+Click).
  2. Right-click, and select Compare Selected Files (N-Way).
  3. The comparison grid will open side-by-side.

Queued Selection

  1. Right-click the first file and select Select for N-Way Compare.
  2. Repeat for additional files (you can do this across different folders).
  3. Open the command palette (Ctrl+Shift+P / Cmd+Shift+P) and run Open N-Way Comparison (or select it from the context menu).
  4. Run Clear N-Way Selection Queue when you want to start a new queue.

💻 Merging Walkthrough

  1. Select your target merge file as the Base File using the dropdown at the top. This column will become editable.
  2. Scan the adjacent columns. Differences will be highlighted in green (additions), red (deletions), and blue (modifications).
  3. To merge an addition or edit from a comparison file, hover your mouse over the line and click the arrow button pointing towards the base file. The text will instantly copy over.
  4. To edit the code manually, click on the text in the Base File column and type freely.
  5. Once your merge is ready, click Save Merge in the top-right corner, or press Ctrl+S (or Cmd+S on macOS) to write the changes back to your file.

🛡 License

This project is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft