       @activateNormalMode()
 
   destroy: ->
-    unless @destroyed
-      @destroyed = true
-      @emitter.emit 'did-destroy'
-      @subscriptions.dispose()
-      if @editor.isAlive()
-        @deactivateInsertMode()
-        @editorElement.component?.setInputEnabled(true)
-        @editorElement.classList.remove("vim-mode")
-        @editorElement.classList.remove("normal-mode")
-      @editor = null
-      @editorElement = null
+    return if @destroyed
+    @destroyed = true
+    @emitter.emit 'did-destroy'
+    @subscriptions.dispose()
+    if @editor.isAlive()
+      @deactivateInsertMode()
+      @editorElement.component?.setInputEnabled(true)
+      @editorElement.classList.remove("vim-mode")
+      @editorElement.classList.remove("normal-mode")
+    @editor = null
+    @editorElement = null
 
   # Private: Creates the plugin's bindings
   #

      'repeat-find-reverse': => new @globalVimState.currentFind.constructor(@editor, this, repeated: true, reverse: true) if @globalVimState.currentFind
      'replace': => new Operators.Replace(@editor, this)
      'search': => new Motions.Search(@editor, this)
      'reverse-search': => (new Motions.Search(@editor, this)).reversed()
      'search-current-word': => new Motions.SearchCurrentWord(@editor, this)
      'bracket-matching-motion': => new Motions.BracketMatchingMotion(@editor, this)
      'reverse-search-current-word': => (new Motions.SearchCurrentWord(@editor, this)).reversed()

  # Private: Register multiple command handlers via an {Object} that maps
  # command names to command handler functions.

  # the given object.
  registerOperationCommands: (operationCommands) ->
    commands = {}
    for name, fn of operationCommands
      do (fn) =>
        commands[name] = (event) => @enqueueOperations(fn(event))
    @registerCommands(commands)

  # Private: Push the given operations onto the operation stack, then process
