     "'": "'"
 
   constructor: (@editSession) ->
-    @buffer = @editSession.buffer
-    @aceMode = @requireAceMode()
-
     @grammar = TextMateBundle.grammarForFileName(@editSession.buffer.getBaseName())
-    @aceAdaptor = new AceAdaptor(@editSession)
 
     _.adviseBefore @editSession, 'insertText', (text) =>
       return true if @editSession.hasMultipleCursors()

        @editSession.insertText text + pairedCharacter
        @editSession.moveCursorLeft()
        false

  requireAceMode: (fileExtension) ->
    modeName = switch @editSession.buffer.getExtension()
      when 'js' then 'javascript'
      when 'coffee' then 'coffee'
      when 'rb', 'ru' then 'ruby'
      when 'c', 'h', 'cpp' then 'c_cpp'
      when 'html', 'htm' then 'html'
      when 'css' then 'css'
      when 'java' then 'java'
      when 'xml' then 'xml'
      else 'text'
    new (require("ace/mode/#{modeName}").Mode)

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

Range = require 'range'
TextMateBundle = require 'text-mate-bundle'
_ = require 'underscore'
