Sublime Forum

How to compare files in ST4?

#1

Native Diff is only if both files are in the same folder or project.
Compare Side by Side plugin is incorrectly opening windows in ST4.
What’s the better solution now?

0 Likes

#2
1 Like

#3

Thanks. I read this post but I don’t have this file: sbs_compare.py
I only have this:
"C:\Users\Rogerio\AppData\Roaming\Sublime Text 3\Installed Packages\Compare Side-By-Side.sublime-package"

What I have to do?

0 Likes

#4

Open Compare Side-By-Side.sublime-package with 7zip or WinRAR. Drag and drop the sbs_compare.py in Sublime Text. Add the following lines to file:

		# move view 1 to group 1

		new_window.set_view_index( new_window.active_view(), 0, 0 )

Remember this must be exactly in line 572 and line 573 of the file and with the right spaces. For a visual example, please see the Pull request on Bitbucket. After that, save changes and restart ST4.

1 Like

#5

There’s also Sublimerge, which allows this without needing to pull plugins out and modify them (though it is a commercial package; you can evaluate it first though).

1 Like

#6

Probably doesn’t matter for ST4 but there’s now a better fix that’s backward compatible with ST3. When I made the changes from that second pull request, the compare plugin was actually able to now work, but for me it still throws a “Could not load colour scheme” error every time a comparison is run. Didn’t notice any issues doing comparisons but that error comes up annoyingly every time you trigger a compare.

As for Sublimerge, I couldn’t get it to install on my ST4. It looks like the domain is down, at least as of now.

0 Likes

#7

As of 2024, Compare Side-By-Side now works on ST4 without needing to patch it manually (as described above). You can just install normally / via package control. So this is now resolved.

0 Likes