windows 允许保存比较标记的差异工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1109929/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:47:48  来源:igfitidea点击:

Diff tool that allows saving the compare markup

windowsdiff

提问by Dana Holt

Is there a diff tool that allows saving of the compare markup?

是否有允许保存比较标记的差异工具?

To clarify, I would like to save the actual comparison of the two files that shows the differences to send to someone for review.

澄清一下,我想保存两个文件的实际比较,显示差异以发送给某人进行。



EDIT

编辑

Lots of good answers here. In my case I already had a copy of Beyond Comparebut didn't see the option. Thanks to John Saunders for pointing out the feature. It's "Session...Text Compare Report..." BTW.

这里有很多很好的答案。就我而言,我已经有一份Beyond Compare的副本,但没有看到该选项。感谢 John Saunders 指出该功能。这是“会话......文本比较报告......”顺便说一句。

My question was not specifically about Beyond Compare, so I am going to accept the answer that currently has the most up votes.

我的问题不是专门关于 Beyond Compare 的,所以我将接受目前投票最多的答案。

回答by Rich Seller

WinMergeis free and allows you to save the differences in various formats. It works well enough for me to not bother looking elsewhere, and I like the price.

WinMerge是免费的,允许您以各种格式保存差异。它对我来说效果很好,不必费心寻找其他地方,而且我喜欢这个价格。

There is also a portable versionif you can't, or don't want to, install it.

如果您不能或不想安装它,还有一个便携式版本

回答by Mitch Haile

You can do this with the command line diff if you're using Unix, though it sounds like you're not. Cygwin does bring a CLI diff, and Mac OS X ships with it.

如果您使用的是 Unix,您可以使用命令行 diff 执行此操作,尽管听起来您不是。Cygwin 确实带来了 CLI 差异,Mac OS X 随附了它。

$ diff <file> <other file> > mydiff.txt

回答by John Saunders

Beyond Comparedoes this.

Beyond Compare 就是这样做的。

回答by maxwellb

I use the Scintilla Text Editor (SciTE) to open a diff file generated by command line or WinMerge, and then export the RTF, and it preserves color highlighting of differences. I use this method especially when emailing short patches for review in-house, and I use Outlook, for example.

我使用 Scintilla 文本编辑器 (SciTE) 打开由命令行或 WinMerge 生成的差异文件,然后导出 RTF,它保留了差异的颜色突出显示。我使用这种方法尤其是在通过电子邮件发送简短补丁以供内部时,例如,我使用 Outlook。

The process I used just now as an example:

以我刚才的流程为例:

# diff -U 1000 a.txt b.txt > diff.txt
# scite diff.txt
### Edit-Copy as RTF
### Paste into Outlook

http://imagebin.ca/img/nBG25am.png

http://imagebin.ca/img/nBG25am.png

WinMerge provides this functionality through the Tools->Generate Patch menu item. I use the MSYS tools on windows, so that I run GNU diff a lot, but once you get the output, I would use SciTE if you need something like the above.

WinMerge 通过“工具”->“生成补丁”菜单项提供此功能。我在 Windows 上使用 MSYS 工具,所以我经常运行 GNU diff,但是一旦你得到输出,如果你需要类似上面的东西,我会使用 SciTE。

回答by PTBNL

ExamDiffdoes a comparison which is shown in a window. It can save a Unix-like formatted version of the differences. Also, the file-to-file comparison version of the program is free!

ExamDiff 进行一个显示在窗口中的比较。它可以保存一个类 Unix 格式的版本的差异。此外,该程序的文件到文件比较版本是免费的!