   constructor: (@vimState) ->
     {@editor, @editorElement} = @vimState
     @emitter = new Emitter
-
-    @onDidActivateMode ({mode, submode}) =>
-      @updateEditorElement()
-      @vimState.statusBarManager.update(mode, submode)
-      @vimState.refreshCursors()
-
-  updateEditorElement: ->
-    for mode in ['normal', 'insert', 'visual', 'operator-pending']
-      @editorElement.classList.toggle("#{mode}-mode", mode is @mode)
-    for submode in ['characterwise', 'linewise', 'blockwise', 'replace']
-      @editorElement.classList.toggle(submode, submode is @submode)
 
   isMode: (mode, submodes) ->
     if submodes?

      when 'operator-pending' then new Disposable # Nothing to do.

    # Now update mode variables and update CSS selectors.
    [@mode, @submode] = [mode, submode]
    @emitter.emit 'did-activate-mode', {@mode, @submode}

  # Normal
  # -------------------------

    if mode is 'reset'
      @editor.clearSelections()
      mode = 'normal'
    else if mode is 'visual'
      if submode is @submode
        mode = 'normal'
        submode = null
      else if submode is 'previous'
        submode = @restorePreviousSelection?() ? 'characterwise'

    @deactivate() if (mode isnt @mode)

    # Activate
    @deactivator = switch mode
