         expect(editor).not.toHaveClass 'command-mode'
         expect(editor).toHaveClass 'insert-mode'
 
-    describe "when the second c is prefixed by a count", ->
-      it "deletes n lines, starting from the current, and enters insert mode", ->
-        editor.setText("12345\nabcde\nABCDE\nQWERT")
-        editor.setCursorScreenPosition([1, 1])
-
-        keydown('c')
-        keydown('2')
-        keydown('c')
-
-        expect(editor.getText()).toBe "12345\nQWERT"
-        expect(editor.getCursorScreenPosition()).toEqual [1, 0]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
-    describe "when followed by an h", ->
-      it "deletes the previous letter on the current line and enters insert mode", ->
-        editor.setText("abcd\n01234")
-        editor.setCursorScreenPosition([1, 1])
-
-        keydown('c')
-        keydown('h')
-
-        expect(editor.getText()).toBe "abcd\n1234"
-        expect(editor.getCursorScreenPosition()).toEqual [1, 0]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
-    describe "when followed by a w", ->
-      it "deletes to the beginning of the next word and enters insert mode", ->
-        editor.setText('abcd efg')
-        editor.setCursorScreenPosition([0, 2])
-
-        keydown('c')
-        keydown('w')
-
-        expect(editor.getText()).toBe 'ab efg'
-        expect(editor.getCursorScreenPosition()).toEqual [0, 2]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
-        keydown('escape')
-
-        editor.setText('one two three four')
-        editor.setCursorScreenPosition([0, 0])
-
-        keydown('c')
-        keydown('3')
-        keydown('w')
-
-        expect(editor.getText()).toBe 'four'
-        expect(editor.getCursorScreenPosition()).toEqual [0, 0]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
-    describe "when followed by a b", ->
-      it "deletes to the beginning of the previous word and enters insert mode", ->
-        editor.setText('abcd efg')
-        editor.setCursorScreenPosition [0, 2]
-
-        keydown('c')
-        keydown('b')
-
-        expect(editor.getText()).toBe 'cd efg'
-        expect(editor.getCursorScreenPosition()).toEqual [0,0]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
-        keydown('escape')
-
-        editor.setText('one two three four')
-        editor.setCursorScreenPosition([0, 11])
-
-        keydown('c')
-        keydown('3')
-        keydown('b')
-
-        expect(editor.getText()).toBe 'ee four'
-        expect(editor.getCursorScreenPosition()).toEqual [0, 0]
-        expect(editor).not.toHaveClass 'command-mode'
-        expect(editor).toHaveClass 'insert-mode'
-
   describe "the C keybinding", ->
     beforeEach ->
       editor.getBuffer().setText("012\n")
       editor.setCursorScreenPosition([0, 1])
+      keydown('C', shift: true)
 
     it "deletes the contents until the end of the line and enters insert mode", ->
-      keydown('C', shift: true)
-
       expect(editor.getText()).toBe "0\n"
       expect(editor.getCursorScreenPosition()).toEqual [0, 1]
       expect(editor).not.toHaveClass 'command-mode'


      editor.getBuffer().setText("abc\n  012\n")
      editor.setCursorScreenPosition([1, 2])

    it "switches to insert and adds a newline above the current one", ->
      keydown('o')

      expect(editor.getText()).toBe "abc\n  012\n  \n"
      expect(editor).toHaveClass 'insert-mode'
      expect(editor.getCursorScreenPosition()).toEqual [2, 2]

    helpers.keydown(key, options)

  describe "the x keybinding", ->
    describe "on a line with content", ->
      beforeEach ->
        editor.setText("012345")
        editor.setCursorScreenPosition([0, 4])

      it "deletes a character", ->
        keydown('x')
        expect(editor.getText()).toBe '01235'
        expect(editor.getCursorScreenPosition()).toEqual [0, 4]
        expect(vimState.getRegister('"').text).toBe '4'

        keydown('x')
        expect(editor.getText()).toBe '0123'
        expect(editor.getCursorScreenPosition()).toEqual [0, 3]
        expect(vimState.getRegister('"').text).toBe '5'

        keydown('x')
        expect(editor.getText()).toBe '012'
        expect(editor.getCursorScreenPosition()).toEqual [0, 2]
        expect(vimState.getRegister('"').text).toBe '3'

    describe "on an empty line", ->
      beforeEach ->
        editor.setText("012345\n\nabcdef")
        editor.setCursorScreenPosition([1, 0])
        keydown('x')

      it "deletes nothing when cursor is on empty line", ->
        expect(editor.getText()).toBe "012345\n\nabcdef"

  describe "the s keybinding", ->
    beforeEach ->
      editor.setText('012345')
      editor.setCursorScreenPosition([0, 1])
      keydown('s')

    it "deletes the character to the right and enters insert mode", ->
      expect(editor).toHaveClass 'insert-mode'
      expect(editor.getText()).toBe '02345'
      expect(editor.getCursorScreenPosition()).toEqual [0, 1]
      expect(vimState.getRegister('"').text).toBe '1'

  describe "the S keybinding", ->
    beforeEach ->
      editor.setText("12345\nabcde\nABCDE")
      editor.setCursorScreenPosition([1, 3])
      keydown('S', shift: true)

    it "deletes the entire line and enters insert mode", ->
      expect(editor).toHaveClass 'insert-mode'
      expect(editor.getText()).toBe "12345\n\nABCDE"
      expect(editor.getCursorScreenPosition()).toEqual [1, 0]
