   controlsEnabled: true
   eventsSuppressed: true
   writable: true
+
+  editModes:
+    'javascript': 'ace/mode/javascript'
+    'coffeescript': 'ace/mode/coffeescript'
 
   keyBindings:
     'default': null


  onChangeEditorConfig: (e) ->
    aceConfig = me.get 'aceConfig'
    @ace.setDisplayIndentGuides (aceConfig.indentGuides || false)
    @ace.setShowInvisibles (aceConfig.invisibles || false)
    @ace.setKeyboardHandler (@keyBindings[aceConfig.keyBindings] || null)

  dismiss: ->
    @recompile() if @spell.hasChangedSignificantly @getSource()

    @aceSession = @ace.getSession()
    @aceDoc = @aceSession.getDocument()
    @aceSession.setUseWorker false
    @aceSession.setMode @editModes[aceConfig.language ? 'javascript']
    @aceSession.setWrapLimitRange null
    @aceSession.setUseWrapMode true
    @aceSession.setNewLineMode "unix"
