Search code examples
sublimetext3diffsublimetext2sublimetext

Comparing the contents of two files in Sublime Text, with a side by side view


I have already read Comparing the contents of two files in Sublime Text but the answers (either the native "Folders > Diff files" feature, or using FileDiffs) show the differences between 2 files like with the diff tool, which I don't want:

 --- file1.py
 +++ file2.py
 @@ -1,21 +1,19 @@
 -import os
 +import os, sys
 import numpy as np
 -print('hello')
 +print('hello world')
 -import sys

Instead, I would like a side-by-side comparison like this with PSPad native diff tool:

enter image description here

How to achieve this side-by-side comparison between two opened files in Sublime Text (2 or 3)?

Is it possible natively with Sublime Text?


Solution

  • Installation for Windows and Linux:

    • Press CTRL + SHIFT + P
    • Type Package Control: Install Package
    • Press ENTER
    • Type Compare Side
    • Select package named Compare Side-By-Side

    How to use?

    • Select one tab which you want to compare
    • Right Mouse Button on second tab which you want to compare
    • Select Compare with active tab

    How it looks?

    Compare Side-By-Side example