A modified DirDiff plugin

January 12, 2004 – 23:27 | vim

[Edit 01/12/2004] William Lee uploaded 1.0.1 at the link below on 2003-10-29 that seems to have fixed the bug. The latest version is 1.0.2 now.
------
The DirDiff plugin(1.0) I downloaded from
http://www.vim.org/scripts/script.php?script_id=102
doesn't seem to replace the path separators for files in sub directories (i.e. not directly under the directories being diff'ed).

I hacked it a bit to make it work. Still trying to contact William Lee, the original author...

See below for the patch for 1.0.

CODE:
  1. 688,689c688,691
  2. <function! Copy(fileFrom, fileTo)
  3. <echo "Copy from " . a:fileFrom . " to " . a:fileTo
  4. ---
  5. > function! Copy(fileFromOrig, fileToOrig)
  6. > let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g')
  7. > let fileTo = substitute(a:fileToOrig, '/', s:sep, 'g')
  8. > echo "Copy from " . fileFrom . " to " . fileTo
  9. 701c703
  10. <let copycmd = copycmd . " "".a:fileFrom."" "".a:fileTo."""
  11. ---
  12. > let copycmd = copycmd . " "".fileFrom."" "".fileTo."""
  13. 709c711
  14. <let copydircmd = copydircmd . " "".a:fileFrom."" "".a:fileTo."""
  15. ---
  16. > let copydircmd = copydircmd . " "".fileFrom."" "".fileTo."""
  17. 712c714
  18. <if (isdirectory(a:fileFrom))
  19. ---
  20. > if (isdirectory(fileFrom))
  21. 718c720
  22. <echo "Can't copy from " . a:fileFrom . " to " . a:fileTo
  23. ---
  24. > echo "Can't copy from " . fileFrom . " to " . fileTo
  25. 742,743c744,746
  26. <function! Delete(fileFrom)
  27. <echo "Deleting from " . a:fileFrom
  28. ---
  29. > function! Delete(fileFromOrig)
  30. > let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g')
  31. > echo "Deleting from " . fileFrom
  32. 751c754
  33. <if (isdirectory(a:fileFrom))
  34. ---
  35. > if (isdirectory(fileFrom))
  36. 773c776
  37. <let delcmd = delcmd ." "".a:fileFrom."""
  38. ---
  39. > let delcmd = delcmd ." "".fileFrom."""
  40. 776c779
  41. <echo "Can't delete " . a:fileFrom
  42. ---
  43. > echo "Can't delete " . fileFrom

Trackback from your site, or follow the comments in RSS.
  1. One Response to “A modified DirDiff plugin”

  2. What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

    By Kameron on Dec 12, 2006

Post a Comment