 
   findAnyStartPair: (cursorPosition) ->
     scanRange = new Range([0, 0], cursorPosition)
-    startPair = _.escapeRegExp(_.keys(startPairMatches).join(''))
-    endPair = _.escapeRegExp(_.keys(endPairMatches).join(''))
+    startPair = _.escapeRegExp(_.keys(@startPairMatches).join(''))
+    endPair = _.escapeRegExp(_.keys(@endPairMatches).join(''))
     combinedRegExp = new RegExp("[#{startPair}#{endPair}]", 'g')
     startPairRegExp = new RegExp("[#{startPair}]", 'g')
     endPairRegExp = new RegExp("[#{endPair}]", 'g')

          @editor.delete()
          # if on the same line and the cursor is in front of an end pair
          # offset by one to make up for the missing character
          if position.row is matchPosition.row and endPairMatches.hasOwnProperty(currentPair)
            position = position.traverse([0, -1])
          @editor.setCursorBufferPosition(position)
          @editor.delete()

      text = @editor.getSelectedText()

      #check if the character to the left is part of a pair
      if @startPairMatches.hasOwnProperty(text) or @endPairMatches.hasOwnProperty(text)
        {position, currentPair, matchingPair} = @findCurrentPair(@startPairMatches)
        if position
          matchPosition = @findMatchingEndPair(position, currentPair, matchingPair)
        else
          {position, currentPair, matchingPair} = @findCurrentPair(@endPairMatches)
          if position
            matchPosition = @findMatchingStartPair(position, matchingPair, currentPair)

