Hello,
I am trying to create a new plist entry for editing files in the SuperCollider language (see: http://www.sourceforge.net/projects/supercollider/ or http://en.wikipedia.org/wiki/SuperCollider )
I started by duplicating the entry for c++ and editing the initial entries as follows:
{ scopeName = "source.sc"; fileTypes = ( "sc", "rtf", "txt" );
However this did not work. It works for files of name <filename>.sc.rtf, <filename>.sc.txt but not for <filename>.sc
Could someone please help me correct the plist entry so that it works for <filename>.sc?
Otherwise the syntax definition for c++ works quite well to cover also the actual syntax of SuperCollider (some adjustments will be needed to make this complete).
Thanks,
Iannis Zannos
On 09/08/2005, at 4.41, Iannis Zannos wrote:
I started by duplicating the entry for c++ and editing the initial entries as follows:
{ scopeName = "source.sc"; fileTypes = ( "sc", "rtf", "txt" );
However this did not work. It works for files of name <filename>.sc.rtf, <filename>.sc.txt but not for <filename>.sc
You can put double extensions in the array, so I'd suggest:
fileTypes = ( "sc", "sc.rtf", "sc.txt" );
That way, txt is still plain text.
As for it not working for sc -- what file type does .sc file open as? This array in the language grammar is only referenced when TM has no stored binding for the extension.
So if you sometime in the past opened a .sc file, and changed language (e.g. to C++) then all future .sc files will open as that language, no matter what the grammar files say.
You can inspect the stored associations by using the (incomplete) Edit File Associations… from the TextMate menu.
If it does have a binding stored for .sc, simply open an .sc file, select View -> Language -> SuperCollider, and it should work as you want.