 
   describe 'the mark keybindings', ->
     beforeEach ->
-      editor.setText('  12\n    34\n56\n')
-      editor.setCursorBufferPosition([0, 1])
+      set
+        text: '  12\n    34\n56\n'
+        cursor: [0, 1]
 
     it 'moves to the beginning of the line of a mark', ->
-      editor.setCursorBufferPosition([1, 1])
-      keydown('m')
-      normalModeInputKeydown('a')
-      editor.setCursorBufferPosition([0, 0])
-      keydown('\'')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorBufferPosition()).toEqual [1, 4]
+      set cursor: [1, 1]
+      ensure ['m', normalChar: 'a']
+      set cursor: [0, 0]
+      ensure ["'", normalChar: 'a'], cursor: [1, 4]
 
     it 'moves literally to a mark', ->
-      editor.setCursorBufferPosition([1, 1])
-      keydown('m')
-      normalModeInputKeydown('a')
-      editor.setCursorBufferPosition([0, 0])
-      keydown('`')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorBufferPosition()).toEqual [1, 1]
+      set cursorBuffer: [1, 1]
+      ensure ['m', normalChar: 'a']
+      set cursorBuffer: [0, 0]
+      ensure ['`', normalChar: 'a'], cursorBuffer: [1, 1]
 
     it 'deletes to a mark by line', ->
-      editor.setCursorBufferPosition([1, 5])
-      keydown('m')
-      normalModeInputKeydown('a')
-      editor.setCursorBufferPosition([0, 0])
-      keydown('d')
-      keydown('\'')
-      normalModeInputKeydown('a')
-      expect(editor.getText()).toEqual '56\n'
+      set cursorBuffer: [1, 5]
+      ensure ['m', normalChar: 'a']
+      set cursorBuffer: [0, 0]
+
+      ensure ["d'", normalChar: 'a'], text: '56\n'
 
     it 'deletes before to a mark literally', ->
-      editor.setCursorBufferPosition([1, 5])
-      keydown('m')
-      normalModeInputKeydown('a')
-      editor.setCursorBufferPosition([0, 1])
-      keydown('d')
-      keydown('`')
-      normalModeInputKeydown('a')
-      expect(editor.getText()).toEqual ' 4\n56\n'
+      set cursorBuffer: [1, 5]
+      ensure ['m', normalChar: 'a']
+      set cursorBuffer: [0, 1]
+      ensure ['d`', normalChar: 'a'], text: ' 4\n56\n'
 
     it 'deletes after to a mark literally', ->
-      editor.setCursorBufferPosition([1, 5])
-      keydown('m')
-      normalModeInputKeydown('a')
-      editor.setCursorBufferPosition([2, 1])
-      keydown('d')
-      keydown('`')
-      normalModeInputKeydown('a')
-      expect(editor.getText()).toEqual '  12\n    36\n'
+      set cursorBuffer: [1, 5]
+      ensure ['m', normalChar: 'a']
+      set cursorBuffer: [2, 1]
+      ensure ['d`', normalChar: 'a'], text: '  12\n    36\n'
 
     it 'moves back to previous', ->
-      editor.setCursorBufferPosition([1, 5])
-      keydown('`')
-      normalModeInputKeydown('`')
-      editor.setCursorBufferPosition([2, 1])
-      keydown('`')
-      normalModeInputKeydown('`')
-      expect(editor.getCursorBufferPosition()).toEqual [1, 5]
+      set cursorBuffer: [1, 5]
+      ensure ['`', normalChar: '`']
+      set cursorBuffer: [2, 1]
+      ensure ['`', normalChar: '`'], cursorBuffer: [1, 5]
 
   describe 'the f/F keybindings', ->
     beforeEach ->
-      editor.setText("abcabcabcabc\n")
-      editor.setCursorScreenPosition([0, 0])
+      set
+        text: "abcabcabcabc\n"
+        cursor: [0, 0]
 
     it 'moves to the first specified character it finds', ->
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      ensure ['f', normalChar: 'c'], cursor: [0, 2]
 
     it 'moves backwards to the first specified character it finds', ->
-      editor.setCursorScreenPosition([0, 2])
-      keydown('F', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      set cursor: [0, 2]
+      ensure ['F', normalChar: 'a'], cursor: [0, 0]
 
     it 'respects count forward', ->
-      keydown('2')
-      keydown('f')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
+      ensure ['2f', normalChar: 'a'], cursor: [0, 6]
 
     it 'respects count backward', ->
-      editor.setCursorScreenPosition([0, 6])
-      keydown('2')
-      keydown('F', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      cursor: [0, 6]
+      ensure ['2F', normalChar: 'a'], cursor: [0, 0]
 
     it "doesn't move if the character specified isn't found", ->
-      keydown('f')
-      normalModeInputKeydown('d')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['f', normalChar: 'd'], cursor: [0, 0]
 
     it "doesn't move if there aren't the specified count of the specified character", ->
-      keydown('1')
-      keydown('0')
-      keydown('f')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['10f', normalChar: 'a'], cursor: [0, 0]
       # a bug was making this behaviour depend on the count
-      keydown('1')
-      keydown('1')
-      keydown('f')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['11f', normalChar: 'a'], cursor: [0, 0]
       # and backwards now
-      editor.setCursorScreenPosition([0, 6])
-      keydown('1')
-      keydown('0')
-      keydown('F', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
-      keydown('1')
-      keydown('1')
-      keydown('F', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
+      set cursor: [0, 6]
+      ensure ['10F', normalChar: 'a'], cursor: [0, 6]
+      ensure ['11F', normalChar: 'a'], cursor: [0, 6]
 
     it "composes with d", ->
-      editor.setCursorScreenPosition([0, 3])
-      keydown('d')
-      keydown('2')
-      keydown('f')
-      normalModeInputKeydown('a')
-      expect(editor.getText()).toEqual 'abcbc\n'
+      set cursor: [0, 3]
+      ensure ['d2f', normalChar: 'a'], text: 'abcbc\n'
 
   describe 'the t/T keybindings', ->
     beforeEach ->
-      editor.setText("abcabcabcabc\n")
-      editor.setCursorScreenPosition([0, 0])
+      set
+        text: "abcabcabcabc\n"
+        cursor: [0, 0]
 
     it 'moves to the character previous to the first specified character it finds', ->
-      keydown('t')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      ensure ['t', normalChar: 'a'], cursor: [0, 2]
       # or stays put when it's already there
-      keydown('t')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      ensure ['t', normalChar: 'a'], cursor: [0, 2]
 
     it 'moves backwards to the character after the first specified character it finds', ->
-      editor.setCursorScreenPosition([0, 2])
-      keydown('T', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 1]
+      set cursor: [0, 2]
+      ensure ['T', normalChar: 'a'], cursor: [0, 1]
 
     it 'respects count forward', ->
-      keydown('2')
-      keydown('t')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
+      ensure ['2t', normalChar: 'a'], cursor: [0, 5]
 
     it 'respects count backward', ->
-      editor.setCursorScreenPosition([0, 6])
-      keydown('2')
-      keydown('T', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 1]
+      set cursor: [0, 6]
+      ensure ['2T', normalChar: 'a'], cursor: [0, 1]
 
     it "doesn't move if the character specified isn't found", ->
-      keydown('t')
-      normalModeInputKeydown('d')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['t', normalChar: 'd'], cursor: [0, 0]
 
     it "doesn't move if there aren't the specified count of the specified character", ->
-      keydown('1')
-      keydown('0')
-      keydown('t')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['10t', normalChar: 'd'], cursor: [0, 0]
       # a bug was making this behaviour depend on the count
-      keydown('1')
-      keydown('1')
-      keydown('t')
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      ensure ['11t', normalChar: 'a'], cursor: [0, 0]
       # and backwards now
-      editor.setCursorScreenPosition([0, 6])
-      keydown('1')
-      keydown('0')
-      keydown('T', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
-      keydown('1')
-      keydown('1')
-      keydown('T', shift: true)
-      normalModeInputKeydown('a')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
+      set cursor: [0, 6]
+      ensure ['10T', normalChar: 'a'], cursor: [0, 6]
+      ensure ['11T', normalChar: 'a'], cursor: [0, 6]
 
     it "composes with d", ->
-      editor.setCursorScreenPosition([0, 3])
-      keydown('d')
-      keydown('2')
-      keydown('t')
-      normalModeInputKeydown('b')
-      expect(editor.getText()).toBe 'abcbcabc\n'
+      set cursor: [0, 3]
+      ensure ['d2t', normalChar: 'b'],
+        text: 'abcbcabc\n'
 
     it "selects character under cursor even when no movement happens", ->
-      editor.setCursorBufferPosition([0, 0])
-      keydown('d')
-      keydown('t')
-      normalModeInputKeydown('b')
-      expect(editor.getText()).toBe 'bcabcabcabc\n'
+      set cursor: [0, 0]
+      ensure ['dt', normalChar: 'b'],
+        text: 'bcabcabcabc\n'
 
   describe 'the V keybinding', ->
     beforeEach ->
-      editor.setText("01\n002\n0003\n00004\n000005\n")
-      editor.setCursorScreenPosition([1, 1])
+      set
+        text: "01\n002\n0003\n00004\n000005\n"
+        cursor: [1, 1]
 
     it "selects down a line", ->
-      keydown('V', shift: true)
-      keydown('j')
-      keydown('j')
-      expect(editor.getSelectedText()).toBe "002\n0003\n00004\n"
+      ensure 'Vjj', selectedText: "002\n0003\n00004\n"
 
     it "selects up a line", ->
-      keydown('V', shift: true)
-      keydown('k')
-      expect(editor.getSelectedText()).toBe "01\n002\n"
+      ensure 'Vk', selectedText: "01\n002\n"
 
   describe 'the ; and , keybindings', ->
     beforeEach ->
-      editor.setText("abcabcabcabc\n")
-      editor.setCursorScreenPosition([0, 0])
+      set
+        text: "abcabcabcabc\n"
+        cursor: [0, 0]
 
     it "repeat f in same direction", ->
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
+      ensure ['f', normalChar: 'c'], cursor: [0, 2]
+      ensure ';', cursor: [0, 5]
+      ensure ';', cursor: [0, 8]
 
     it "repeat F in same direction", ->
-      editor.setCursorScreenPosition([0, 10])
-      keydown('F', shift: true)
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      set cursor: [0, 10]
+      ensure ['F', normalChar: 'c'], cursor: [0, 8]
+      ensure ';', cursor: [0, 5]
+      ensure ';', cursor: [0, 2]
 
     it "repeat f in opposite direction", ->
-      editor.setCursorScreenPosition([0, 6])
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      set cursor: [0, 6]
+      ensure ['f', normalChar: 'c'], cursor: [0, 8]
+      ensure ',', cursor: [0, 5]
+      ensure ',', cursor: [0, 2]
+
 
     it "repeat F in opposite direction", ->
-      editor.setCursorScreenPosition([0, 4])
-      keydown('F', shift: true)
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
+      set cursor: [0, 4]
+      ensure ['F', normalChar: 'c'], cursor: [0, 2]
+      ensure ',', cursor: [0, 5]
+      ensure ',', cursor: [0, 8]
 
     it "alternate repeat f in same direction and reverse", ->
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      ensure ['f', normalChar: 'c'], cursor: [0, 2]
+      ensure ';', cursor: [0, 5]
+      ensure ',', cursor: [0, 2]
 
     it "alternate repeat F in same direction and reverse", ->
-      editor.setCursorScreenPosition([0, 10])
-      keydown('F', shift: true)
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 5]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
+      set cursor: [0, 10]
+      ensure ['F', normalChar: 'c'], cursor: [0, 8]
+      ensure ';', cursor: [0, 5]
+      ensure ',', cursor: [0, 8]
 
     it "repeat t in same direction", ->
-      keydown('t')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 1]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 4]
+      ensure ['t', normalChar: 'c'], cursor: [0, 1]
+      ensure ';', cursor: [0, 4]
 
     it "repeat T in same direction", ->
-      editor.setCursorScreenPosition([0, 10])
-      keydown('T', shift: true)
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 9]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
+      set cursor: [0, 10]
+      ensure ['T', normalChar: 'c'], cursor: [0, 9]
+      ensure ';', cursor: [0, 6]
 
     it "repeat t in opposite direction first, and then reverse", ->
-      editor.setCursorScreenPosition([0, 3])
-      keydown('t')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 4]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 3]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 4]
+      set cursor: [0, 3]
+      ensure ['t', normalChar: 'c'], cursor: [0, 4]
+      ensure ',', cursor: [0, 3]
+      ensure ';', cursor: [0, 4]
 
     it "repeat T in opposite direction first, and then reverse", ->
-      editor.setCursorScreenPosition([0, 4])
-      keydown('T', shift: true)
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 3]
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 4]
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 3]
+      set cursor: [0, 4]
+      ensure ['T', normalChar: 'c'], cursor: [0, 3]
+      ensure ',', cursor: [0, 4]
+      ensure ';', cursor: [0, 3]
 
     it "repeat with count in same direction", ->
-      editor.setCursorScreenPosition([0, 0])
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-      keydown('2')
-      keydown(';')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
+      set cursor: [0, 0]
+      ensure ['f', normalChar: 'c'], cursor: [0, 2]
+      ensure '2;', cursor: [0, 8]
 
     it "repeat with count in reverse direction", ->
-      editor.setCursorScreenPosition([0, 6])
-      keydown('f')
-      normalModeInputKeydown('c')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 8]
-      keydown('2')
-      keydown(',')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+      set cursor: [0, 6]
+      ensure ['f', normalChar: 'c'], cursor: [0, 8]
+      ensure '2,', cursor: [0, 2]
 
     it "shares the most recent find/till command with other editors", ->
       helpers.getEditorElement (otherEditorElement) ->
         otherEditor = otherEditorElement.getModel()
 
-        editor.setText("a baz bar\n")
-        editor.setCursorScreenPosition([0, 0])
+        set
+          text: "a baz bar\n"
+          cursor: [0, 0]
 
         otherEditor.setText("foo bar baz")
         otherEditor.setCursorScreenPosition([0, 0])
 
         # by default keyDown and such go in the usual editor
-        keydown('f')
-        normalModeInputKeydown('b')
-        expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+        ensure ['f', normalChar: 'b'], cursor: [0, 2]
         expect(otherEditor.getCursorScreenPosition()).toEqual [0, 0]
 
         # replay same find in the other editor
         keydown(';', element: otherEditorElement)
-        expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+        ensure '', cursor: [0, 2]
         expect(otherEditor.getCursorScreenPosition()).toEqual [0, 4]
 
         # do a till in the other editor
         keydown('t', element: otherEditorElement)
         normalModeInputKeydown('r', editor: otherEditor)
-        expect(editor.getCursorScreenPosition()).toEqual [0, 2]
+        ensure '', cursor: [0, 2]
         expect(otherEditor.getCursorScreenPosition()).toEqual [0, 5]
 
         # and replay in the normal editor
-        keydown(';')
-        expect(editor.getCursorScreenPosition()).toEqual [0, 7]
+        ensure ';',
+          cursor: [0, 7]
         expect(otherEditor.getCursorScreenPosition()).toEqual [0, 5]
 
   describe 'the % motion', ->
     beforeEach ->
-      editor.setText("( ( ) )--{ text in here; and a function call(with parameters) }\n")
-      editor.setCursorScreenPosition([0, 0])
+      set
+        text: "( ( ) )--{ text in here; and a function call(with parameters) }\n"
+        cursor: [0, 0]
 
     it 'matches the correct parenthesis', ->
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 6]
+      ensure '%', cursor: [0, 6]
 
     it 'matches the correct brace', ->
-      editor.setCursorScreenPosition([0, 9])
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 62]
+      set cursor: [0, 9]
+      ensure '%', cursor: [0, 62]
 
     it 'composes correctly with d', ->
-      editor.setCursorScreenPosition([0, 9])
-      keydown('d')
-      keydown('%')
-      expect(editor.getText()).toEqual  "( ( ) )--\n"
+      set cursor: [0, 9]
+      ensure 'd%',
+        text: "( ( ) )--\n"
 
     it 'moves correctly when composed with v going forward', ->
-      keydown('v')
-      keydown('h')
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 7]
+      ensure 'vh%', cursor: [0, 7]
 
     it 'moves correctly when composed with v going backward', ->
-      editor.setCursorScreenPosition([0, 5])
-      keydown('v')
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
+      set cursor: [0, 5]
+      ensure 'v%', cursor: [0, 0]
 
     it 'it moves appropriately to find the nearest matching action', ->
-      editor.setCursorScreenPosition([0, 3])
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-      expect(editor.getText()).toEqual  "( ( ) )--{ text in here; and a function call(with parameters) }\n"
+      set cursor: [0, 3]
+      ensure '%',
+        cursor: [0, 2]
+        text: "( ( ) )--{ text in here; and a function call(with parameters) }\n"
 
     it 'it moves appropriately to find the nearest matching action', ->
-      editor.setCursorScreenPosition([0, 26])
-      keydown('%')
-      expect(editor.getCursorScreenPosition()).toEqual [0, 60]
-      expect(editor.getText()).toEqual  "( ( ) )--{ text in here; and a function call(with parameters) }\n"
+      set cursor: [0, 26]
+      ensure '%',
+        cursor: [0, 60]
+        text: "( ( ) )--{ text in here; and a function call(with parameters) }\n"
 
     it "finds matches across multiple lines", ->
-      editor.setText("...(\n...)")
-      editor.setCursorScreenPosition([0, 0])
-      keydown("%")
-      expect(editor.getCursorScreenPosition()).toEqual([1, 3])
+      set
+        text: "...(\n...)"
+        cursor: [0, 0]
+      ensure '%',
+        cursor: [1, 3]
 
     it "does not affect search history", ->
-      keydown('/')
-      submitNormalModeInputText 'func'
-      expect(editor.getCursorBufferPosition()).toEqual [0, 31]
-      keydown('%')
-      expect(editor.getCursorBufferPosition()).toEqual [0, 60]
-      keydown('n')
-      expect(editor.getCursorBufferPosition()).toEqual [0, 31]
+      ensure ['/', normal: 'func'], cursor: [0, 31]
+      ensure '%', cursor: [0, 60]
+      ensure 'n', cursor: [0, 31]
 
   describe "scrolling screen and keeping cursor in the same screen position", ->
     beforeEach ->

      pane = {activate: jasmine.createSpy("activate")}
      spyOn(atom.workspace, 'getActivePane').andReturn(pane)

      editor.setText("abc\ndef\nabc\ndef\n")
      editor.setCursorBufferPosition([0, 0])

      # clear search history
      vimState.globalVimState.searchHistory = []


      describe "case sensitivity", ->
        beforeEach ->
          set
            text: "\nabc\nABC\n"
            cursor: [0, 0]

        it "works in case sensitive mode", ->
          ensure ['/', normal: 'ABC'], cursor: [2, 0]
          ensure 'n', cursor: [2, 0]

        it "works in case insensitive mode", ->
          ensure ['/', normal: '\\cAbC'], cursor: [1, 0]
          ensure 'n', cursor: [2, 0]

        it "works in case insensitive mode wherever \\c is", ->
          ensure ['/', normal: 'AbC\\c'], cursor: [1, 0]
          ensure 'n', cursor: [2, 0]

        it "uses case insensitive search if useSmartcaseForSearch is true and searching lowercase", ->
          atom.config.set 'vim-mode.useSmartcaseForSearch', true
          ensure ['/', normal: 'abc'], cursor: [1, 0]
          ensure 'n', cursor: [2, 0]

        it "uses case sensitive search if useSmartcaseForSearch is true and searching uppercase", ->
          atom.config.set 'vim-mode.useSmartcaseForSearch', true
          ensure ['/', normal: 'ABC'], cursor: [2, 0]
          ensure 'n', cursor: [2, 0]

      describe "repeating", ->
        it "does nothing with no search history", ->
          set cursor: [0, 0]
          ensure 'n', cursor: [0, 0]
          set cursor: [1, 1]
          ensure 'n', cursor: [1, 1]

      describe "repeating with search history", ->
        beforeEach ->
