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.
-
688,689c688,691
-
<function! Copy(fileFrom, fileTo)
-
<echo "Copy from " . a:fileFrom . " to " . a:fileTo
-
---
-
> function! Copy(fileFromOrig, fileToOrig)
-
> let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g')
-
> let fileTo = substitute(a:fileToOrig, '/', s:sep, 'g')
-
> echo "Copy from " . fileFrom . " to " . fileTo
-
701c703
-
<let copycmd = copycmd . " "".a:fileFrom."" "".a:fileTo."""
-
---
-
> let copycmd = copycmd . " "".fileFrom."" "".fileTo."""
-
709c711
-
<let copydircmd = copydircmd . " "".a:fileFrom."" "".a:fileTo."""
-
---
-
> let copydircmd = copydircmd . " "".fileFrom."" "".fileTo."""
-
712c714
-
<if (isdirectory(a:fileFrom))
-
---
-
> if (isdirectory(fileFrom))
-
718c720
-
<echo "Can't copy from " . a:fileFrom . " to " . a:fileTo
-
---
-
> echo "Can't copy from " . fileFrom . " to " . fileTo
-
742,743c744,746
-
<function! Delete(fileFrom)
-
<echo "Deleting from " . a:fileFrom
-
---
-
> function! Delete(fileFromOrig)
-
> let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g')
-
> echo "Deleting from " . fileFrom
-
751c754
-
<if (isdirectory(a:fileFrom))
-
---
-
> if (isdirectory(fileFrom))
-
773c776
-
<let delcmd = delcmd ." "".a:fileFrom."""
-
---
-
> let delcmd = delcmd ." "".fileFrom."""
-
776c779
-
<echo "Can't delete " . a:fileFrom
-
---
-
> echo "Can't delete " . fileFrom

2 Responses to “A modified DirDiff plugin”
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