   User events
   ###
 
-  onContentsModified: =>
-    @parse()
+  onBufferChanged: =>
+    clearTimeout @bufferChangedTimeoutId
+    @bufferChangedTimeoutId = setTimeout @parse, 0
 
   onCursorMoved: =>
-    # clearTimeout @timeoutId
-    # @timeoutId = setTimeout @updateReferences, 0
-    # nextTick => @updateReferences()
-    @updateReferences()
+    clearTimeout @cursorMovedTimeoutId
+    @cursorMovedTimeoutId = setTimeout @updateReferences, 0
 
 
   ###

    # Start listening
    @editorView.on 'cursor:moved', @onCursorMoved
    @editor.on 'destroyed', @onDestroyed
    # @editor.on 'contents-modified', @onContentsModified
    @editor.buffer.on 'changed', @onContentsModified

    # Execute
    @parse()

  5. Start listening cursor move event.
  ###

  parse: =>
    @editorView.off 'cursor:moved', @onCursorMoved
    @hideError()
    @referenceView.update()
