   #
   # Returns nothing.
   setupCommandMode: ->
-    # Commands here start a new mode instead of popping the operation stack
-    # immediately.
-    @editorView.command 'vim-mode:search', =>
-      @currentSearch = new Motions.Search(@editorView, @)
-    @editorView.command 'vim-mode:reverse-search', =>
-      @currentSearch = new Motions.Search(@editorView, @)
-      @currentSearch.reversed()
-    @editorView.command 'vim-mode:replace', =>
-      @currentReplace = new Operators.Replace(@editorView, @)
-
-    @editorView.command 'vim-mode:activate-command-mode', => @activateCommandMode()
-    @editorView.command 'vim-mode:activate-insert-mode', => @activateInsertMode()
-    @editorView.command 'vim-mode:activate-linewise-visual-mode', => @activateVisualMode('linewise')
-    @editorView.command 'vim-mode:activate-characterwise-visual-mode', => @activateVisualMode('characterwise')
-    @editorView.command 'vim-mode:activate-blockwise-visual-mode', => @activateVisualMode('blockwise')
-    @editorView.command 'vim-mode:reset-command-mode', => @resetCommandMode()
-
-    @handleCommands
+    @registerCommands
+      'search': => @currentSearch = new Motions.Search(@editorView, @)
+      'reverse-search': => @currentSearch = (new Motions.Search(@editorView, @)).reversed()
+      'replace': => @currentReplace = new Operators.Replace(@editorView, @)
+      'activate-command-mode': => @activateCommandMode()
+      'activate-insert-mode': => @activateInsertMode()
+      'activate-linewise-visual-mode': => @activateVisualMode('linewise')
+      'activate-characterwise-visual-mode': => @activateVisualMode('characterwise')
+      'activate-blockwise-visual-mode': => @activateVisualMode('blockwise')
+      'reset-command-mode': => @resetCommandMode()
+      'repeat-prefix': (e) => @repeatPrefix(e)
+
+    @registerOperationCommands
       'substitute': => new Commands.Substitute(@editor, @)
       'substitute-line': => new Commands.SubstituteLine(@editor, @)
       'insert-after': => new Commands.InsertAfter(@editor, @)

      if @mode is 'visual' and operation instanceof Motions.Motion
        operation.execute = operation.select

      @opStack.push(operation) if operation

      # If we've received an operator in visual mode, mark the current
      # selection as the motion to operate on.

      'scroll-up': => new Scroll.ScrollUp(@editorView, @editor)
      'select-inside-word': => new TextObjects.SelectInsideWord(@editor)
      'register-prefix': (e) => @registerPrefix(e)
      'repeat': (e) => new Operators.Repeat(@editor, @)
      'search-complete': (e) => @currentSearch
      'replace-complete': (e) => @currentReplace
