Sublime Forum

Compare Contents Of Two Files Natively

#1

Quite simple I have two PHP files whose contents I like to compare with ST3 Build 3083.

Looking at this question on SO stackoverflow.com/questions/258 … blime-text it seems this is possible natively without installing a package.

However when I try this, select both files in the folder and right-click I only get the “Close” command. I have the SideBarEnhancements package installed though, so this is the reason for the native function of comparing file contents is not available anymore, am I correct assuming this?

Does this mean I have to install the packagecontrol.io/packages/FileDiffs FileDiffs package?

I already see a simple “yes” as reply…

However thank you for any help with this or confirming this. Is there something I need to look out for using the FileDiffs package? Any usage tips from the pros?

Thank you.

:smile:

0 Likes

#2

Try look if you have somehow disabled native “Diff” syntax and if so, turn it on again… it will also add the context menu in the files tree.

To do that just:

  1. cmd+shift+P
  2. choose “enable packages”
  3. check if Diff is shown in the list (if so, re-enable it) and restart ST
  4. profit!

hope it helps :smile:

0 Likes

#3

Not sure about any native diff support, but FileDiffs is pretty excellent. It has a bunch of options, works really well and is quite configurable. If you have SideBarEnhancements installed it’ll appear on that menu as “Diff with file in project”, beyond that it’s all accessible from the command palette via Ctrl+Shift+P then typing fild

:smile:

0 Likes

#4

[quote=“Orlmente”]Try look if you have somehow disabled native “Diff” syntax and if so, turn it on again… it will also add the context menu in the files tree.

To do that just:

  1. cmd+shift+P
  2. choose “enable packages”
  3. check if Diff is shown in the list (if so, re-enable it) and restart ST
  4. profit!

hope it helps :smile:[/quote]

Thank you.

Native “Diff” is not present. If it is not on the list, how do I re-enable it please?

[quote=“qgates”]Not sure about any native diff support, but FileDiffs is pretty excellent. It has a bunch of options, works really well and is quite configurable. If you have SideBarEnhancements installed it’ll appear on that menu as “Diff with file in project”, beyond that it’s all accessible from the command palette via Ctrl+Shift+P then typing fild

:smile:[/quote]

I can indeed find the FileDiffs package and that comes up in the SidebarEnhancements as well. Thank you.

So yeah, native or with package, I can compare file. Though why and when the native diff support went missing and why I have no clue. Can I get it back? Is there a way to reset all this? But then I loose all my other packages. I am running SBT3 in portable mode, so from a folder, can I simply make a copy of the folder and all settings and files will be present when I copy them back, so that I can try re-setting the whole spiel?

I am also feeling a bit kind of strange about the concept of packages, where they are, how they are obtained and how they simply seem to override settings or key shortcuts from native packages or previously installed packages. Not quite grasped all that concept yet…

0 Likes