开发者

find/highlight common substrings between two buffers in Emacs

Can somebody tell me how 开发者_C百科to highlight common substrings between two buffers in Emacs? I can write a script to do that but was wondering if there was a built-in macro in Emacs by which I can do this.

Thanks, Raj


If you're willing to accept the converse—seeing highlighted differences rather than similarities—then the ediff package will handle this for you. Try the function ediff-buffers. You can run it interactively with

M-x ediff-buffers RET

and specify the first buffer to compare, then the second. The first one will wind up on the top and the second one on the bottom, assuming you use the default layout with the two buffers shown split vertically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜