         @editor.backspace()
 
   findMatchingEndPair: (startPairPosition, startPair, endPair) ->
-    scanRange = new Range(startPairPosition.translate([0, 1]), @editor.buffer.getEndPosition())
+    scanRange = new Range(startPairPosition.add([0, 1]), @editor.buffer.getEndPosition())
     endPairPosition = null
     unpairedCount = 0
     @editor.scanInBufferRange pairRegexes[startPair], scanRange, ({match, range, stop}) ->

          # 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.translate([0, -1])
          @editor.setCursorBufferPosition(position)
          @editor.delete()
        else

      if startRange.compare(endRange) > 0
        [startRange, endRange] = [endRange, startRange]

      # include the <
      startRange = new Range(startRange.start.add([0, -1]), endRange.end.add([0, -1]))
      # include the </
      endRange = new Range(endRange.start.add([0, -2]), endRange.end.add([0, -2]))

      if position.isLessThan(endRange.start)
        tagCharacterOffset = position.column - startRange.start.column
        tagCharacterOffset++ if tagCharacterOffset > 0
        tagCharacterOffset = Math.min(tagCharacterOffset, tagLength + 2) # include </
        @editor.setCursorBufferPosition(endRange.start.add([0, tagCharacterOffset]))
      else
        tagCharacterOffset = position.column - endRange.start.column
        tagCharacterOffset-- if tagCharacterOffset > 1
        tagCharacterOffset = Math.min(tagCharacterOffset, tagLength + 1) # include <
        @editor.setCursorBufferPosition(startRange.start.add([0, tagCharacterOffset]))
    else
      previousPosition = position.add([0, -1])
      startPosition = @startView.bufferPosition
      endPosition = @endView.bufferPosition

      if position.isEqual(startPosition)
        @editor.setCursorBufferPosition(endPosition.add([0, 1]))
      else if previousPosition.isEqual(startPosition)
        @editor.setCursorBufferPosition(endPosition)
      else if position.isEqual(endPosition)
        @editor.setCursorBufferPosition(startPosition.add([0, 1]))
      else if previousPosition.isEqual(endPosition)
        @editor.setCursorBufferPosition(startPosition)

