[TxMt] Re: how can I make TextMate the default editor for text files on 10.5.6
Rob McBroom
textmate at skurfer.com
Mon Apr 6 03:31:22 UTC 2009
On 2009-Apr-4, at 12:38 AM, Bill Paxton wrote:
> For files with an extension, I can get the system to use TextMate for
> all files with that extension.
> But I'd like something that works automatically for files without
> extensions (like "newfile" in the example).
Would you want `/bin/ls` to open in TextMate? Not that anyone would
try that particular example, but there are plenty of things in my home
directory (let alone the entire system) without extensions that
shouldn't open in a text editor. A blind default isn't the answer.
On 2009-Apr-5, at 10:13 AM, John Laudun wrote:
> As many people have pointed out, this is indeed a Finder problem, but
> it makes it no less frustrating for users who do not wish to have
> extensions on text files. (In the old days, wasn't that what the
> resource fork was for? And wasn't the promise of the modern OSes to
> dispense with the file extension system?)
As far as I can tell, most modern OSes are perfectly happy sticking
with the crappy "file type as part of the file name" technique. Mac OS
X is the only one I know if that promised to fix this. My
understanding is that, as of 10.5 (maybe it was even 10.4), UTI is
supposed to be "the way" to specify file type, while extensions and
other things are a fallback. I've always been content to just drag
things to the TextMate Dock icon or use Quicksilver to "open with",
but this thread made me look into it a little.
Based on the theory that UTI is authoritative, the correct way to
handle this is to just set the UTI for text files with no extension to
"public.plain-text", but in practice, it looks like the only way to
change the UTI is to change the extension. What the hell is the point
of that? (There are some special cases, like if you set an
extensionless file to executable, the UTI becomes "public.unix-
executable".) I think we're stuck until there becomes a
straightforward way to control UTI. The alternative is to treat all
extensionless files the same. The wrongness of that far outweighs any
convenience.
For the record, according to Allan, I am one of about three people
that didn't like TextMate claiming all extensionless files under 10.4,
while there were about 3 bajillion people that didn't care what was
appropriate or what made sense as long as they could click click click
on stuff. :)
--
Rob McBroom
<http://www.skurfer.com/>
More information about the textmate
mailing list