如题: Given your references to Vim in the question, I'm not sure if this is the answer you want :) but Emacs can do this. Open the file containing the diff, make sure that you're in diff-mode (if the file is named foo.diff or foo.patch this happens aut
1.diff的三种格式: 正常格式(normal diff) 上下文格式(context diff) 合并格式(unified diff) 2.示例文件为了便于讲解,先新建两个示例文件.第一个文件叫做f1,内容是每行一个a,一共7行. a a a a a a a 第二个文件叫做f2,修改f1而成,第4行变成b,其他不变. a a a b a a a 3.正常格式的diff最早的Unix(即AT&T版本的Unix),使用的就是这种格式的diff. $diff f1 f2 这时,diff就会显示正常
-U<n>--unified=<n> Generate diffs with <n> lines of context instead of the usual three. Implies -p. =============================================================================================================== -p-u--patch Generate patc