11
votes
What text comparison software do you use?
I've only had exposure to Beyond Compare and would like your opinion/suggestions on what's good.
mostly, I use it to compare two different versions of similar csv and potentially to merge them. Next use case is to compare two versions of simple scripts to see what's been updated.
Command line tools are a little too much for me, but if it seem to be very important to learn I supposed I could be encouraged to do so.
I use VSCode for pretty much everything text related.
Open both files, open the Explorer in the sidebar, select both files in the 'Open Editors' sections, right click a file -> 'Compare Selected'
More specifically, when you are comparing two files, say file A and file B, you want to select the file that you think you want to see the changes on and click "Select For Compare", and the one that you want to diff with "Compare With Selected". It was confusing at first but the "selected" document should be the primary document if you get what I'm saying.
I've used so many of these and I'll say there is still nothing as good as Beyond Compare. That said, as datavoid said, VS Code is pretty decent.
Agreed. I use Beyond Compare at work and I liked it so much that ended up getting a personal license for it. If I remember right it was a pretty cheap perpetual license.
I just use diff
If it's a lot, I just pipe the results to a file first.
If I don't have diff available I just use an online diff checker.
I've used Meld before, it's graphical.
I don’t compare text often enough, but yeah, I do simply use diff, I’ve never used a text comparing tool before diff(or after), since my use cases are pretty simple.
On macOS I use FileMerge. It comes with Xcode and as such is located in a weird place ("Applications > Xcode.app > Contents > Applications > FileMerge.app"), but you can access it via Spotlight. A simple tool but it does the job.
When using IntelliJ I use its built in diff tools. Especially when doing VCS diffs or merge resolution, their VCS UI is really good. Similarly for VSCode or any other IDE.
Vim and Emacs unfortunately don't seem to have good built-in diff tools, although Neovim has diffview.nvim. On the command line I use
diff
often, but I'll admit it's not nearly as good as the GUI tools, so it only works well for simple diffs.Lastly, when I need to generate a report for a diff, e.g. to share with others, I use diff2html
If the lines of the CSV are not sorted you could try sorting on a column then use something like
kdiff3
for diffing.xsv sort
will sort lexicographicallyIt sounds like your CSVs are not too different but in the case that your CSVs are a real mess without much similarity you could try sorting with a tool I wrote which will sort the lines based on the term similarity of all the columns:
As for merging:
If you just need to concatenate the CSVs use
xsv cat
Otherwise, if you can convert your CSVs to SQLITE with
sqlite-utils
...ie.
then you can merge the SQLITE files together based on a specific column:
I've previously used 010 Editors's compare functionality, before I used Beyond.
Most use cases Beyond will do just fine.
If you want to see why two tars are differently sized but their opened content is equal, 010 might be more comfortable imo.
I've been a fan of kdiff3 for years and I'm not even a Linux user! There are binaries available for Windows and Mac.
It's got a usable UI, smart whitespace display options, merge support (including auto-merge), 3-way diff/merge, recursive directory diffing, and it's FOSS. That ticks all my boxes. It's not the prettiest app but it's extremely capable. I configured git to use it for diffs and merges and it works like a champ. In a previous career I used the directory diff to compare a production site's web root with my local dev environment to detect PHP malware after the server was compromised. Nowadays I'm mostly using it to review staged files before committing them, or resolve merge conflicts.