         event.stop()
         return
 
-      if isEscapedCharRange(@editor, event.range)
-        return
-
-      fn(event)
+      return if isEscapedCharRange(@editor, event.range)
+      if @filterEvent(event)
+        fn(event)
 
   findPair: (which, direction, from, fn) ->
     stack = []

    [open, close] = pair
    @pattern = ///(#{_.escapeRegExp(open)})|(#{_.escapeRegExp(close)})///g

  getEventState: ({match, range}) ->
    state = switch
      when match[1] then 'open'


  getPattern: ->
    @pattern

  getCharacterRangeInformation: (char, point) ->
    pattern = ///#{_.escapeRegExp(char)}///g
    total = scanBufferRow(@editor, point.row, pattern).filter (range) =>
      not isEscapedCharRange(@editor, range)
    [left, right] = _.partition(total, ({start}) -> start.isLessThan(point))
    balanced = (total.length % 2) is 0
    {total, left, right, balanced}

  filterEvent: ->
    true

  scanPair: (which, direction, from, fn) ->
    switch direction
