     'Alt-Shift-.'     : 'end'
     'Ctrl-L'          : 'consolelog'
 
+  sessions: {}
+
   initialize: ->
     @ace = ace.edit "editor"
     @ace.setTheme require "ace/theme/twilight"

    return @saveAs() if not @filename

    File.write @filename, @ace.getSession().getValue()
    activeWindow.setDirty false
    @ace._emit 'save', { @filename }


      @ace.focus()
      @ace.resize()
    , timeout

  newSession: (code) ->
    doc = new EditSession code or ''
    doc.setUndoManager new UndoManager
    doc

  copy: ->
    editor = @ace
