1 {Disposable, CompositeDisposable} = require 'event-kit'
4 'insert': ["status-bar-vim-mode-insert", "Insert"]
5 'insert.replace': ["status-bar-vim-mode-insert", "Replace"]
6 'command': ["status-bar-vim-mode-command", "Command"]
7 'visual': ["status-bar-vim-mode-visual", "Visual"]
8 'visual.characterwise': ["status-bar-vim-mode-visual", "Visual"]
9 'visual.linewise': ["status-bar-vim-mode-visual", "Visual Line"]
10 'visual.blockwise': ["status-bar-vim-mode-visual", "Visual Block"]
13 class StatusBarManager
15 @element = document.createElement("div")
16 @element.id = "status-bar-vim-mode"
18 @container = document.createElement("div")
19 @container.className = "inline-block"
20 @container.appendChild(@element)
22 initialize: (@statusBar) ->
24 update: (currentMode, currentSubmode) ->
25 currentMode = currentMode + "." + currentSubmode if currentSubmode?
26 if newContents = ContentsByMode[currentMode]
27 [klass, text] = newContents
28 @element.className = klass
29 @element.textContent = text
34 @tile = @statusBar.addRightTile(item: @container, priority: 20)