 
         @cm.on('change', @_cm_change)
         @cm.on('scroll', @_cm_scroll)
-######
-        options =
-            mode                    : {name:opts.mode, globalVars: true}
-            readOnly                : opts.read_only
-            lineNumbers             : opts.line_numbers
-            firstLineNumber         : opts.first_line_number
-            showTrailingSpace       : opts.show_trailing_whitespace
-            indentUnit              : opts.indent_unit
-            tabSize                 : opts.tab_size
-            smartIndent             : opts.smart_indent
-            electricChars           : opts.electric_chars
-            undoDepth               : opts.undo_depth
-            matchBrackets           : opts.match_brackets
-            autoCloseBrackets       : opts.auto_close_brackets
-            autoCloseTags           : opts.auto_close_xml_tags
-            lineWrapping            : opts.line_wrapping
-            styleActiveLine         : opts.style_active_line
-            indentWithTabs          : not opts.spaces_instead_of_tabs
-            showCursorWhenSelecting : true
-            extraKeys               : extraKeys
-            cursorScrollMargin      : 40
-            autofocus               : false
-
-        if opts.match_xml_tags
-            options.matchTags = {bothTags: true}
-
-        if opts.code_folding
-             extraKeys["Ctrl-Q"] = (cm) -> cm.foldCodeSelectionAware()
-             options.foldGutter  = true
-             options.gutters     = ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
-
-        if opts.bindings? and opts.bindings != "standard"
-            options.keyMap = opts.bindings
-            #cursorBlinkRate: 1000
-
-        if opts.theme? and opts.theme != "standard"
-            options.theme = opts.theme
-######
-        cm = CodeMirror.fromTextArea(node, options)
-        cm.save = () => @click_save_button()
-
-        if opts.bindings == 'vim'
-            # annoying due to api change in vim mode
-            cm.setOption("vimMode", true)
 
     _cm_change: ->
         console.log("_cm_change")

            style       : rtypes.object
            scroll_info : rtypes.object
            doc         : rtypes.object
        account :
            editor_settings  : rtypes.object

    propTypes :
        actions     : rtypes.object


default_store_state =
    style :
        border : '1px solid grey'
    value : ''
    options : {}

exports.init_redux = init_redux = (redux, project_id, filename) ->
    name = redux_name(project_id, filename)
