       @editor.moveRight()
       false
     else if autoCompleteOpeningBracket
-      @editor.insertText(text + pair)
+      @origEditorInsertText(text + pair)
       @editor.moveLeft()
       range = [cursorBufferPosition, cursorBufferPosition.traverse([0, text.length])]
       @bracketMarkers.push @editor.markBufferRange(range)

    @subscriptions = new CompositeDisposable
    @bracketMarkers = []

    _.adviseBefore(@editor, 'insertText', @insertText)
    _.adviseBefore(@editor, 'insertNewline', @insertNewline)
    _.adviseBefore(@editor, 'backspace', @backspace)

    hasEscapeSequenceBeforeCursor = previousCharacters.match(/\\/g)?.length >= 1 # To guard against the "\\" sequence
    if @pairsToIndent[previousCharacter] is nextCharacter and not hasEscapeSequenceBeforeCursor
      @editor.transact =>
        @origEditorInsertText "\n\n"
        @editor.moveUp()
        if atom.config.get('editor.autoIndent')
          cursorRow = @editor.getCursorBufferPosition().row
