     @firepad.setText content  if @amIHost
     @codeMirrorEditor.scrollTo 0, 0
     @emit "OpenedAFile", file, content
-    @setEditorMode file
+    @setEditorMode file.getExtension()
 
   save: ->
     file        = @getData()

      json             : "javascript"
      js               : "javascript"
      go               : "go"

    if corrections[fileExtension]
      modeName = corrections[fileExtension]

        "Ctrl-S"      : @bound "handleSave"

    @setEditorTheme()
    @setEditorMode 'html'

  handleSave: ->
    @save()
