<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
In another thread Allan Odgaard wrote:
<blockquote
 cite="mid:21544B83-DA11-4708-B903-229F77457D35@macromates.com"
 type="cite">TextMate
will not search binary files, granted it knows that the file type is
binary. So right-click a file (using the extension you want to exclude)
in the project drawer and select to treat it as binary.
  <br>
</blockquote>
<br>
That helps, but isn't perfect.  For one thing, it can't handle files
without an extension, such as executables.  If I just open a directory
as a project, it's likely to be a mixed bag of source, object, and
executable files.  It's easy enough to tell TextMate to skip the object
(*.o) files, but how do I tell it that the executable named "xyzzy" is
binary?<br>
<br>
There's another quirk related to filename extensions that drives me
nuts.  For various reasons, I have a lot of files with the extension
"*.txt" which actually contain different types of data. We have, for
instance, configuration files, SNMP MIB files, and plain ol' text files
sharing that extension. I'd like
different syntax highlighting rules to be used for each.  So I open
"foo.txt" and change the language to "MIB".  Then I open "bar.txt" and
change to "plain text", and so on.  It seems that every time I open a
file with the *.txt extension I have to fiddle with the language.<br>
<br>
(Yeah, if it were up to me I'd give all these files different
extensions.
Unfortunately the naming conventions were established long before I was
hired here!)<br>
<br>
Since the majority of *.txt files I edit actually are plain text, I
think it'd be great if I could tell TextMate explicitly, "Treat *.txt
as plain text unless I tell you specifically otherwise" instead of
having it automatically change the definition of the whole extension
whenever I switch.  I'd still end up changing types, but at least it'd
cut down on how often I'd need to. Bonus points for remembering which
full filenames have been manually mapped to something else.<br>
<br>
What would be even better would be for TextMate to examine the contents
of the file as well as the filename to determine what language it is. 
If the extension is ambiguous, check the first few bytes for a shell
shebang line, or an emacs-style modeline, or some other clue as to the
type.  And I would absolutely swoon if the language definition itself
contained a way to specify what to look for, letting TextMate try each
language in turn until it found a match.<br>
<br>
<div class="moz-signature">-- <br>
<address
 style="font-family: sans-serif; font-style: italic; font-size: smaller;">
Steve King<br>
Sr. Software Engineer<br>
Arbor Networks<br>
+1 734 821 1461<br>
<a href="http://www.arbornetworks.com/">www.arbornetworks.com</a>
</address>
</div>
</body>
</html>