         if not @cm? or not @props.actions?
             return
         @props.set_last_cursor(@cm.getCursor())
+        if @_vim_mode
+            return
         @props.actions.set_mode('escape')
 
     _cm_cursor: ->

        @props.actions.unselect_all_cells()
        @props.actions.set_cur_id(@props.id)
        @props.actions.set_mode('edit')
        @_cm_cursor()

    _cm_blur: ->

            # this somehow.  Note that codemirror has no .blur().
            # See http://codemirror.977696.n3.nabble.com/Blur-CodeMirror-editor-td4026158.html
            setTimeout((=>@cm?.getInputField().blur()), 1)
        if @_vim_mode and not next.is_focused and @props.is_focused
            $(@cm.getWrapperElement()).css(paddingBottom:0)


    componentWillUnmount: ->
        if @cm?
