Hi,
I'm using TextMate for Ruby and Rails development. There is a feature/ behaviour that worked correctly, back in early days, but it doesn't work now, since long. Here it goes: I have a changelog.txt file in my Rails project, that describes changes made in svn-commits. This file should be viewed as "Release Notes" file-type (then it's properly colored etc.). But it is in conflict with the Subversion-bundle (or Diff-bundle?), because temporaty diff-files generated by TextMate (when using Subversion- bundle) have now a .txt extension too, not .diff, as it used to have. Now, when I'm manually switching the language from the popup-menu (the one located at the bottom of the diff window) then next time I'm viewing a changelog.txt, it's treated as "Plain Text", not as "Release Notes" type of document. When I'm manually switching it to the "Release Notes" then next time a diff is generated, it's displayed as "Plain Text", not as "Diff".
I tried to look into the bundles, but I cannot find anything helpful. Maybe the diffs should have a .diff file--extension? Maybe I have something messed-up in my bundle-config?
Described behaviour is consistent on 2 machines (both PowerPC and Intel).
Any ideas? TIA.
On 26. May 2007, at 14:42, Rafał Komorowski wrote:
[...] temporaty diff-files generated by TextMate (when using Subversion-bundle) have now a .txt extension too, not .diff, as it used to have.
I assume this is when invoking diff from the commit or status window? The rest of the diff actions should AFAIK be fine. But those two should have the used extension changed.
On 26/05/2007, at 20:31, Allan Odgaard wrote:
I assume this is when invoking diff from the commit or status window? The rest of the diff actions should AFAIK be fine. But those two should have the used extension changed.
It seems you're right. When I select: Bundle → Subversion → Diff → Diff with Working Copy then I get "untitled" text-window properly set to "Diff" (and properly colored, of course).
I tried again to look into the guts of Subversion.tmbundle, to find the place where the temporary files are generated, but I can't find this. Too weak textmater I am...
On 26. May 2007, at 21:32, Rafał Komorowski wrote:
I assume this is when invoking diff from the commit or status window? The rest of the diff actions should AFAIK be fine. But those two should have the used extension changed.
It seems you're right. When I select: Bundle → Subversion → Diff → Diff with Working Copy then I get "untitled" text-window properly set to "Diff" (and properly colored, of course).
I tried again to look into the guts of Subversion.tmbundle, to find the place where the temporary files are generated, but I can't find this. Too weak textmater I am...
Both the commit window and the status window use “mate” to send text to TextMate, and does so by piping the text to mate’s standard input.
Presently this results in a temporary file with a ‘.txt’ extension -- so to make a fix now, you’d have to change these two commands to create their own temporary file with a ‘.diff’ extension. The current temporary file though is just an implementation detail I’d like to get rid of in the future.
On Sat, 26 May 2007, Rafał Komorowski wrote:
I have a changelog.txt file in my Rails project, that describes changes made in svn-commits. This file should be viewed as "Release Notes" file-type (then it's properly colored etc.). But it is in conflict with the Subversion-bundle (or Diff-bundle?), because temporaty diff-files generated by TextMate (when using Subversion-bundle) have now a .txt extension too, not .diff, as it used to have.
You could try the TabMate plugin. It's not a proper fix, but it might be a viable work-around for you. TabMate reads a special modeline (à la Emacs) from the first line of the file. This modeline can specify the file type, tab width, and hard or soft tabs on a file-by-file basis. So, if you have different types of text files all ending in ".txt", you can use the modeline to specify "diff" or "Release Notes" or whatever.