     Ace.emit 'ScriptLoaded'
 
 
+  toBindKey = (binding) ->
+
+    bindKey = {}
+    bindKey[globals.keymapType] = binding
+      .split '+'
+      .map (frag) ->
+        return "#{frag.charAt(0).toUpperCase()}#{frag.slice(1)}"
+      .join '-'
+
+
   toCommand = (obj, exec) ->
 
     # given a keyconfig model json and a callback, converts it to

    @emit 'FileHasBeenSavedAs', @getData()


  setEditorListeners: ->

    @editor.getSession().selection.on 'changeCursor', (cursor) =>

      if e.command.name is 'insertstring' and /^[\w.]$/.test e.args
        @editor.completer and @editor.completer.autoInsert = off
        @editor.execCommand 'startAutocomplete'


  showFindReplaceView: (openReplaceView) ->
