I knew I'd feel stupid. I was just wrong why :-)

Ok, thanks. I still have a little trouble getting my diffexpr right.
Here is what I have done.

It looks great.

  - I get four (!) output files: diff_in_1 and diff_new_1 only contain
one line, 'line1' and 'line2' respectively. diff_in_2 and diff_new_2
have the same contents as vdt0 and vdt1

But when I uncomment the substitute commands
  - I only get two output file diff_in_1 and diff_new_1, both containing
just one line 'lin'
  - vim warns me that it can't create a difference ("E97 Kann keine
Differenz erstellen")

I think what's happening is that Vim is using these 'line1' and 'line2'
files to check diff is working properly. And when they get changed to
'lin' and 'lin', diff no longer outputs what Vim expects, so it fails.

Try ensuring those files don't have the substitution done on them by
something like this:

   if line('$') > 1
      %s/^\(.\{3}\).*$/\1/
   endif

Diffing a single line file is pretty meaningless anyway, unless it's for
testing!

Ben.



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

Reply via email to