TextMate file type association

In the menu, go to Bundles -> Bundle Editor -> Edit Languages -> XML -> XML. (That is, in the section XML, you have both XML and XSL.)

Then in the grammar you will see in the right pane, add RDF files to the fileTypes section. (That section is right at the top of the grammar in this case, but as @umassthrower points out, it may be later.):

    {   scopeName = 'text.xml';
        fileTypes = ( 'xml', 'tld', 'jsp', 'pt', 'cpt', 'dtml', 'rss', 'opml' );

See this link for more gory details on filetype associations.

Per @zengabor in a comment, “In TextMate 2 the steps are: Bundles > Edit Bundles... > XML > Language Grammars > XML, and then edit the list of "File Types" in the drawer.”


Textmate 2 remembers the last language used for an extension.

You could customise the bundle if you wish

  1. ^⌥⌘-B (bundle editor) --> language grammars
  2. Add your extension to the "File Types" list (just click the + icon