@@ -0,0 +1,716 @@
+import sublime, sublime_plugin%0Aimport os%0A%0Aclass MochaCoffeeScriptDetectFileTypeCommand(sublime_plugin.EventListener):%0A  %22%22%22 Detects current file type if the file's extension isn't conclusive %22%22%22%0A%0A  def on_load(self, view):%0A    filename = view.file_name()%0A    if not filename: # buffer has never been saved%0A      return%0A%0A    name = os.path.basename(filename.lower())%0A    if name.endswith(%22spec.js.coffee%22) or name.endswith(%22spec.coffee%22):%0A      set_syntax(view, %22Mocha CoffeeScript%22, %22Mocha CoffeeScript/Syntaxes%22)%0A%0Adef set_syntax(view, syntax, path=None):%0A  if path is None:%0A    path = syntax%0A  view.settings().set('syntax', 'Packages/'+ path + '/' + syntax + '.tmLanguage')%0A  print(%22Switched syntax to: %22 + syntax)%0A

Add filetype detection