开发者

How does VimDiff works?

I have searched on net but everywhere use and example of VimDiff was there. Can someone please explain me how does vimdiff works ?

Basically the problem is we have two documents at system1 and syste2 has only document no1. now i need to compute some diff over two docs at system1 so that diff开发者_运维知识库 can be shipped over network and then we can generate doc2 using diff and doc1.


Depending on your goals, this is probably a solved problem. I would recommend using one of the following:

  1. If your documents are flat text files: diff and patch
  2. If your documents are binary data: rdiff
  3. If 2, but you'd like the diffing and patching to be handled for you: rsync

Regarding the question as asked, it looks like vimdiff uses an external program (typically diff, but can be specified). An explanation of how diff works is here: http://en.wikipedia.org/wiki/Diff#Algorithm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜