         false
 
   wrapSelectionInBrackets: (editSession, bracket) ->
-    pair = @startPairMatches[bracket]
+    pair = @pairedCharacters[bracket]
     editSession.mutateSelectedText (selection) =>
       return if selection.isEmpty()
 

        editSession.moveCursorRight()
        false
      else if autoCompleteOpeningBracket
        editSession.insertText(text + @startPairMatches[text])
        editSession.moveCursorLeft()
        range = [cursorBufferPosition, cursorBufferPosition.add([0, text.length])]
        @bracketMarkers.push editSession.markBufferRange(range)

  isQuote: (string) ->
    /'|"/.test(string)

  getInvertedPairedCharacters: ->
    return @invertedPairedCharacters if @invertedPairedCharacters

    @invertedPairedCharacters = {}
    for open, close of @pairedCharacters
      @invertedPairedCharacters[close] = open
    @invertedPairedCharacters

  isOpeningBracket: (string) ->
    @pairedCharacters[string]?

  isClosingBracket: (string) ->
    @getInvertedPairedCharacters()[string]?
