         @insertTextBelow(selection, text)
     else
       if @isMode('visual', 'linewise')
-        text += '\n' unless text.endsWith('\n')
+        text += "\n" unless text.endsWith("\n")
       else
         selection.insertText("\n")
       selection.insertText(text)

    swrap(selection).setBufferRange(range, {preserveFolds: true, reversed})
    @editor.scrollToCursorPosition({center: true})

  isLastRow: (row) ->
    row is @editor.getBuffer().getLastRow()

  rotateRows: (rows) ->
    rows.push(rows.shift())


  submode: 'replace'

  repeatInsert: (selection, text) ->
    for char in text when (char isnt "\n")
      break if selection.cursor.isAtEndOfLine()
      selection.selectRight()
    selection.insertText(text, autoIndent: false)
