vimdiff improvement idea was: Re: Diff Error
- Milan Vancura wrote:
> an idea for improvement: if there is :vimgrep as an alternative toThe big difference between grep and diff is that Vim already has pattern
> :!grep, what about :viminternaldiff as an alternative to :!diff ? (The
> command :vimdiff will still be working as in nowadays).
> Two benefits what we can get with this:
> 1. faster and OS independent :vimdiff
> 2. diff algoritm will be implemented in vim itself, so there is a
> possibility to apply it for comparation of different lines - so the
> colorizing of changes in line will be better (it can compare two lines
> instead of two files looking for chars instead of lines, but the
> algoritm will stay the same)
> A disadvantage is obvious also - we can't reimplement all unix
> utilities in vim :-)
> So what do you think about it?
matching code, thus implementing a grep command does not require adding
a lot of complicated code. If you look at the source code of a diff
program you will find that it is rather complicated. I looked into this
when adding the diff functionality, but found the extra code to be too
much to include inside Vim. There also is no performance requirement
(like with the spell code).
The main disadvantage with an external diff program is that you need to
have one. Mainly a problem on non-Unix systems, since it's standard on
Nothing is impossible for the man who doesn't have to do it.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///