[TxMt] Req: Compare docs-Diff

Torsten Becker torsten.becker at gmail.com
Thu Feb 17 18:46:30 UTC 2005


On Thu, 17 Feb 2005 16:43 (+0100), Fred B. wrote:
> After the small features request, here is a big one ;)
> I'm sure we talked about it here, but I don't remember if this is
> planned or not.
> 
> Actually, I use TextMate for everything text-related except one thing:
> comparing two document(Diff).
> Unfortunately I need this feature a lot. For me, this is "The Last Big
> Thing" that TM misses.
> 
> The best solution I found so far is to have a command launching
> TextWrangler to compare the active one and one I have to choose(w/Cocoa
> Dialog).
> 1) The way to launch this is a bit clumsy. (Having to navigate thru an
> "open" dialog)
> 2) Having TextWrangler opened just for that sucks a bit.
> 3) Having to edit the files in TW really sucks. I miss all the TM
> goodness and It makes me feels I'm back in time. ;)
> (And worst of all, I use TM shortcuts all the time and wonder why my
> commands, snippets, etc. don't work 8-| )
> 4) This doesn't work with remote files, or I have to open them in TW.
> Meaning changing the prefs of my SFTP client.
> 
> What I like in the "Compare two front documents" feature of TW:
> -The full screen is shared by the two docs with the Differences window
> under.
> -You can navigate easily thru the diffs.
> -Closing the Differences window brings the docs back where they were.
> -It exists. ;)
> You can even check differences of folders and batch files.
> 
> So, my question is:
> Do you plan to implement this in TM, Allan?
> If the answer is yes, any idea when we might expect this?
> 
> Meanwhile, does anybody have a better solution?
> 
> --
> Thanks

comparing files visually is possible, if you have beta 5 you can use
this command:
(its based on some of chris thomas' subversion commands)

> TMPFILE=`mktemp /tmp/tm-svn.XXXXXX` || exit 1
> mv "$TMPFILE" "$TMPFILE.diff"
> TMPFILE="$TMPFILE.diff"
> 
> ruby > "$TMPFILE" <<END
>   puts %x{diff -u $TM_SELECTED_FILES}
> END
> 
> open -a TextMate "$TMPFILE" &
Save: Nothing
Input: None
Output: Discard

you can select 2 files in the project drawer and after executing this
command a colored diff should pop up.


-- 
Torsten Becker



More information about the textmate mailing list