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.
精彩评论