Happy New Year everyone-
I know "scope" probably isn't the right word here, but this is what I'm struggling with:
I work with a fellow who uses TextWrangler, and for a bunch of legacy reasons, has language files (Forth) that have no extension to indicate their contents. I'd love to be able to open these and have them automatically be parsed as Forth source. This is an obvious solution for a folder:
[ "cocoa/*" ] fileType = "source.forth"
But some folders also have other file types in them with extensions: .txt, .prf ,etc.
So it'd be great to say something like this:
[ "cocoa/*" ] fileType = "source.forth"
["cocoa/*.{txt, prf}"] fileType = "text.plain"
and have any text or preferences file be treated as text, and anything else be considered a Forth source file.
Is this the way that TM2 works? Or are all specifications assumed to be mutually exclusive?
(And if they are expected to be mutually exclusive, how are glob conflicts handled?)
Thanks! Charles
On 01/01/2012, at 20.59, Charles Turner wrote:
[…] it'd be great to say something like this:
[ "cocoa/*" ] fileType = "source.forth"
["cocoa/*.{txt, prf}"] fileType = "text.plain"
Except for the whitespace errors in second section, it should work, i.e.:
[ "cocoa/*" ] fileType = "source.forth"
[ "cocoa/*.{txt,prf}" ] fileType = "text.plain"
You can however also do:
[ "!cocoa/*.*" ] fileType = "source.forth"
That then targets only files without extension.
On Tue, Jan 3, 2012 at 5:17 PM, Allan Odgaard mailinglist@textmate.org wrote:
You can however also do:
[ "!cocoa/*.*" ] fileType = "source.forth"
That then targets only files without extension.
Brilliant! (as is TM2...)