 
         @$editor.completers = [completer]
 
-      # @$editor.commands.addCommand
-      #   name: 'contextHelp'
-      #   bindKey: 
-      #     win: 'Ctrl-Space'  
-      #     mac: 'Ctrl-Space'
-      #   exec: (editor) =>
-      #       cursor = editor.getCursorPosition()
-      #       line = editor.session.getDocument().getLine(cursor.row)
-      #       sub = line.substring(0, cursor.column)
-      #       elStart = sub.lastIndexOf('<')
-
-      #       sub2 = line.substring(elStart, line.length)
-
-      #       ident = line.match("</?([^ >]+)[^<]+$")[1]
-
-      #       @dispatcher.trigger("editor:context", ident)
-      #   readOnly: false # false if this command should not apply in readOnly mode
-
-      # @$editor.commands.addCommand
-      #   name: 'newElement'
-      #   bindKey: 
-      #     win: '<'  
-      #     mac: '<'
-      #   exec: (editor) =>           
-      #       @$editor.commands.exec @$editor.commands.commands.startAutocomplete, @$editor
-      #       editor.getSession().insert editor.getCursorPosition(), '<'
-            
-      #       # console.log @$editor.completers[0].showPopup(@$editor)
-
-      #   readOnly: false 
-
-      @
-
-    # addCompletions: (completions) -> 
-    #   completer = 
-    #     getCompletions: (editor, session, pos, prefix, callback) ->  
-    #         console.log pos           
-    #         callback null, completions  
-
-    #   @$editor.completers.push completer
+        ace.config.on "desc", (e) =>
+          @dispatcher.trigger("editor:context", e.ident)
+
+        ace.config.on "desc:clear", (e) =>
+          @dispatcher.trigger 'notification:clear'
+
+      @
 
     setContent: -> @$editor.setValue @model.get('content')
 

      # Load ace modules #

      # ext_language_tools for autocompletion
      ace.config.set("basePath", "../deps/")
      ace.config.loadModule 'ace/ext/angles', () =>

        @$editor.setOptions 
          enableBasicAutocompletion: true

        completer = 
          getCompletions: (editor, session, pos, prefix, callback) => 


              pos = editor.getCursorPosition()              
              ident = _findParent(pos.row, pos.column)
              completions = []

              children = context.getChildrenOf(ident);
