           keydown('d')
           keydown('-')
 
-        it 'selects to the first character of the previous line', ->
+        it "selects to the first character of the previous line", ->
           expect(editor.getText()).toBe "abcdefg\n"
           expect(editor.getCursorScreenPosition()).toEqual [0, 0]
 

          keydown('3')
          keydown('-')

        it 'deletes the current line plus that many previous lines', ->
          expect(editor.getText()).toBe "1\n6\n"
          expect(editor.getCursorScreenPosition()).toEqual [1, 0]

  describe "the + keybinding (which should also be equivalent to the enter keybinding)", ->
    beforeEach ->
      editor.setText("  abc\n  abc\nabcdefg\n")


          keydown('3')
          keydown('+')

        it "deletes the current line plus that many following lines", ->
          expect(editor.getText()).toBe "1\n6\n"
          expect(editor.getCursorScreenPosition()).toEqual [1, 0]

  describe "the enter keybinding", ->
    keydownCodeForEnter = '\r' # 'enter' does not work
    startingText = "  abc\n  abc\nabcdefg\n"

    describe "from the middle of a line", ->
      startingCursorPosition = [1, 3]

      describe "as a motion", ->
        it "acts the same as the + keybinding", ->
          # do it with + and save the results
          editor.setText(startingText)
          editor.setCursorScreenPosition(startingCursorPosition)
          keydown('+')
          referenceCursorPosition = editor.getCursorScreenPosition()
          # do it again with enter and compare the results
          editor.setText(startingText)
          editor.setCursorScreenPosition(startingCursorPosition)
          keydown(keydownCodeForEnter)
          expect(editor.getCursorScreenPosition()).toEqual referenceCursorPosition

      describe "as a selection", ->
        it "acts the same as the + keybinding", ->
          # do it with + and save the results
          editor.setText(startingText)
          editor.setCursorScreenPosition(startingCursorPosition)
          keydown('d')
          keydown('+')
          referenceText = editor.getText()
          referenceCursorPosition = editor.getCursorScreenPosition()
          # do it again with enter and compare the results
          editor.setText(startingText)
          editor.setCursorScreenPosition(startingCursorPosition)
          keydown('d')
          keydown(keydownCodeForEnter)
          expect(editor.getText()).toEqual referenceText
          expect(editor.getCursorScreenPosition()).toEqual referenceCursorPosition

  describe "the gg keybinding", ->
    beforeEach ->
