 atom.commands.add 'atom-text-editor', stopEventPropagation(
   'core:undo': -> @undo()
   'core:redo': -> @redo()
-)
-
-atom.commands.add 'atom-text-editor', stopEventPropagationAndGroupUndo(
   'core:move-left': -> @moveLeft()
   'core:move-right': -> @moveRight()
   'core:select-left': -> @selectLeft()
   'core:select-right': -> @selectRight()
   'core:select-all': -> @selectAll()
-  'core:backspace': -> @backspace()
-  'core:delete': -> @delete()
-  'core:cut': -> @cutSelectedText()
-  'core:copy': -> @copySelectedText()
-  'core:paste': -> @pasteText()
   'editor:move-to-previous-word': -> @moveToPreviousWord()
   'editor:select-word': -> @selectWordsContainingCursors()
   'editor:consolidate-selections': (event) -> event.abortKeyBinding() unless @consolidateSelections()
-  'editor:delete-to-beginning-of-word': -> @deleteToBeginningOfWord()
-  'editor:delete-to-beginning-of-line': -> @deleteToBeginningOfLine()
-  'editor:delete-to-end-of-line': -> @deleteToEndOfLine()
-  'editor:delete-to-end-of-word': -> @deleteToEndOfWord()
-  'editor:delete-line': -> @deleteLine()
-  'editor:cut-to-end-of-line': -> @cutToEndOfLine()
   'editor:move-to-beginning-of-next-paragraph': -> @moveToBeginningOfNextParagraph()
   'editor:move-to-beginning-of-previous-paragraph': -> @moveToBeginningOfPreviousParagraph()
   'editor:move-to-beginning-of-screen-line': -> @moveToBeginningOfScreenLine()

  'core:select-to-bottom': -> @selectToBottom()
  'core:select-page-up': -> @selectPageUp()
  'core:select-page-down': -> @selectPageDown()
  'editor:indent': -> @indent()
  'editor:auto-indent': -> @autoIndentSelectedRows()
  'editor:indent-selected-rows': -> @indentSelectedRows()
  'editor:outdent-selected-rows': -> @outdentSelectedRows()
  'editor:newline': -> @insertNewline()
  'editor:newline-below': -> @insertNewlineBelow()
  'editor:newline-above': -> @insertNewlineAbove()
  'editor:add-selection-below': -> @addSelectionBelow()
  'editor:add-selection-above': -> @addSelectionAbove()
  'editor:split-selections-into-lines': -> @splitSelectionsIntoLines()

  'editor:fold-at-indent-level-7': -> @foldAllAtIndentLevel(6)
  'editor:fold-at-indent-level-8': -> @foldAllAtIndentLevel(7)
  'editor:fold-at-indent-level-9': -> @foldAllAtIndentLevel(8)
  'editor:log-cursor-scope': -> @logCursorScope()
  'editor:copy-path': -> @copyPathToClipboard()
  'editor:toggle-indent-guide': -> atom.config.set('editor.showIndentGuide', not atom.config.get('editor.showIndentGuide'))
  'editor:toggle-line-numbers': -> atom.config.set('editor.showLineNumbers', not atom.config.get('editor.showLineNumbers'))
  'editor:scroll-to-cursor': -> @scrollToCursorPosition()
)

atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUndo(
  'editor:indent': -> @indent()
  'editor:auto-indent': -> @autoIndentSelectedRows()
  'editor:indent-selected-rows': -> @indentSelectedRows()
  'editor:outdent-selected-rows': -> @outdentSelectedRows()
  'editor:newline': -> @insertNewline()
  'editor:newline-below': -> @insertNewlineBelow()
  'editor:newline-above': -> @insertNewlineAbove()
  'editor:toggle-line-comments': -> @toggleLineCommentsInSelection()
  'editor:checkout-head-revision': -> atom.project.getRepositories()[0]?.checkoutHeadForEditor(this)
  'editor:move-line-up': -> @moveLineUp()
  'editor:move-line-down': -> @moveLineDown()
  'editor:duplicate-lines': -> @duplicateLines()
  'editor:join-lines': -> @joinLines()
)

module.exports = TextEditorElement = document.registerElement 'atom-text-editor', prototype: TextEditorElement.prototype
