 _ = require 'underscore-plus'
-{$} = require 'atom'
+{Point, Range} = require 'atom'
 {Emitter, Disposable, CompositeDisposable} = require 'event-kit'
 
 Operators = require './operators/index'

Utils = require './utils'
Panes = require './panes'
Scroll = require './scroll'
{$$, Point, Range} = require 'atom'
Marker = require 'atom'

module.exports =
class VimState


  updateStatusBar: ->
    atom.packages.onDidActivateAll =>
      unless @statusBarItem?
        @statusBarItem = document.createElement("div")
        @statusBarItem.id = "status-bar-vim-mode"
        @statusBarItem.classList.add("inline-block")
        @statusBarItem.innerHTML = "Command"
        atom.workspaceView.statusBar?.prependRight(@statusBarItem)
        @updateStatusBar()

    return unless @statusBarItem

    @statusBarItem.classList.remove(
      "status-bar-vim-mode-insert",
      "status-bar-vim-mode-command",
      "status-bar-vim-mode-visual",
    )

    for mode, [klass, html] of StatusBarContents
      if mode is @mode
        @statusBarItem.classList.add(klass)
        @statusBarItem.innerHTML = html
      else
        @statusBarItem.classList.remove(klass)
