 
         @codemirror = make_editor(elt[0])
         @codemirror.name = '0'
+        #window.cm = @codemirror
 
         elt1 = @element.find(".webapp-editor-textarea-1")
 


            if opts.code_folding
                extraKeys["Ctrl-Q"] = (cm) -> cm.foldCodeSelectionAware()
                options.foldGutter  = true
                options.gutters     = ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]



            "Ctrl-Space"   : "autocomplete"

        if feature.IS_TOUCH
            # Better more external keyboard friendly shortcuts, motivated by iPad.
            misc.merge extraKeys,
                "Alt-L"        : (editor)   => @goto_line(editor)
                "Alt-I"        : (editor)   => @toggle_split_view(editor)
                "Shift-Alt-L"  : (editor)   => editor.align_assignments()
                'Alt-Z'        : (editor)   => editor.undo()
                'Shift-Alt-Z'  : (editor)   => editor.redo()
                'Alt-A'        : (editor)   => editor.execCommand('selectAll')
                'Shift-Alt-A'  : (editor)   => editor.execCommand('selectAll')
                'Alt-K'        : (editor)   => editor.execCommand('killLine')
                'Alt-D'        : (editor)   => editor.execCommand('selectNextOccurrence')
                'Alt-C'        : (editor)   => @copy(editor)  # gets overwritten for vim mode, of course
                'Alt-X'        : (editor)   => @cut(editor)
                'Alt-V'        : (editor)   => @paste(editor)
                'Alt-F'        : (editor)   => editor.execCommand('find')
                'Shift-Alt-F'  : (editor)   => editor.execCommand('replace')
                'Shift-Alt-R'  : (editor)   => editor.execCommand('replaceAll')
                'Shift-Alt-D'  : (editor)   => editor.execCommand('duplicateLine')
                'Alt-G'        : (editor)   => editor.execCommand('findNext')
                'Alt-Up'       : (editor)   => editor.execCommand('goPageUp')
                'Alt-Down'     : (editor)   => editor.execCommand('goPageDown')
                'Alt-P'        : (editor)   => editor.execCommand('goLineUp')
                'Alt-N'        : (editor)   => editor.execCommand('goLineDown')
                'q'  : (editor)   => console.log('hi'); editor.execCommand('findPrevious')

            if opts.bindings == 'vim'
                # An additional key to get to visual mode in vim (added for ipad Smart Keyboard)
                extraKeys["Alt-C"] = (editor) =>
                    CodeMirror.Vim.exitInsertMode(editor)
                extraKeys["Alt-F"] = (editor) =>
                    editor.execCommand('goPageDown')
                extraKeys["Alt-B"] = (editor) =>
                    editor.execCommand('goPageUp')

        if opts.match_xml_tags
            extraKeys['Ctrl-J'] = "toMatchingTag"
