On 7/22/06, Christ van Willegen <[EMAIL PROTECTED]> wrote:
we sometimes copy source from one project
to another, usually between classes of the same fuctionality, but
different naming.
vim -d <src1> <src2> does almost what I want, but:
- Highlights differences in class names, and
- When putting/getting differencens, the class name is not updated.
You can tell vim to use alternate diff command
to produce the diffs. See ':help diff-diffexpr'. Thus
if you have a script, say, 'mydiff' that ignore specific
renamings when comparing 2 files, you can easily
tell vim to use your script instead of standard 'diff'.
The unclear part if how you tell vimdiff which renamings
are to be ignored. But if you hardcode renamings into
the script, the script is not that difficult; just apply
sed to both files, redirect output to 2 temp files, then
run diff on 2 temp files.
Regarding "When putting/getting differencens, the class name is not
updated", this is more difficult. As 1st step, it is
possible to redefine :diffput, :diffget into custom
functions using tip#1285
(http://www.vim.org/tips/tip.php?tip_id=1285). Then you need
to handle renamings inside those functions.
Yakov