Sunday, October 3, 2010

Re: vim diff

Do I need open two files in vim or use vimdiff command?

On Oct 2, 7:57 am, Andy Wokula <anw...@yahoo.de> wrote:
> Am 24.08.2010 04:31, schrieb rudy b:
>  > Hi,
>  > I have a question about "diff".
>  > I've always found "diff" very powerful, and I've never had any issue
>  > with this commad.
>  > Expect that I encoutered a problem, that I wish "diff" would be just
>  > slightly more flexible.
>  >
>  > Usually "diff" is very smart in aligning the lines in a way to
>  > optimise its match.
>  > Is there any way that I can set some sort of flag for the "diff"
>  > command to start comparing the files line by line ONLY (and not try to
>  > use any of its smart matching algorithms) ?
>  > line#1 (file1)      ....  line#1 (file2)
>  > line#2 (file1)      ....  line#2 (file2)
>  > line#3 (file1)      ....  line#3 (file2)
>  > ...
>  > line#n (file1)      ....  line#n (file2)
>  >
>  > thanks in advance,
>  > Rudy
>
> This kind of diff can be done in Vimscript, see attached plugin!  It's
> simple yet, for example 'diffopt' is ignored.
>
> Usage:
>
> :SetLineByLineDiff
>      enable line-by-line diff (set 'diffexpr' to a different value)
>
> :SetLineByLineDiff!
>      disable, set 'diffexpr' back to the default
>
> --
> Andy
>
>  diffbyline.vim
> 3KViewDownload

--
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:

Post a Comment