Thursday, September 2, 2010

Re: vimdiff-like highlighting within the same file?

> Neil Fraser's diff_match_patch ... might be of interest.

Awesome! Thanks for the pointer, James!

The Python version of diff-match-patch seems to work pretty dang well.
I did a few quick tests with diff_main() and diff_cleanupSemantic().
The API is simple, clear, and predictable! This could be used in a Vim
script if Python support is compiled into Vim.

Porting diff-match-patch to Vim script is another option... that might
be kinda fun.

Hmm, that gives me another idea... Vim also has/uses some diffing
algorithm since Vimdiff highlights differences in lines. We could
change Vim itself to expose whatever diffing logic vimdiff uses so Vim
scripts could use it. Maybe even using an API similar to
diff-match-patch.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: