2 'insert': ["status-bar-vim-mode-insert", "Insert"]
3 'insert.replace': ["status-bar-vim-mode-insert", "Replace"]
4 'normal': ["status-bar-vim-mode-normal", "Normal"]
5 'visual': ["status-bar-vim-mode-visual", "Visual"]
6 'visual.characterwise': ["status-bar-vim-mode-visual", "Visual"]
7 'visual.linewise': ["status-bar-vim-mode-visual", "Visual Line"]
8 'visual.blockwise': ["status-bar-vim-mode-visual", "Visual Block"]
11 class StatusBarManager
13 @element = document.createElement("div")
14 @element.id = "status-bar-vim-mode"
16 @container = document.createElement("div")
17 @container.className = "inline-block"
18 @container.appendChild(@element)
20 initialize: (@statusBar) ->
22 update: (currentMode, currentSubmode) ->
23 currentMode = currentMode + "." + currentSubmode if currentSubmode?
24 if newContents = ContentsByMode[currentMode]
25 [klass, text] = newContents
26 @element.className = klass
27 @element.textContent = text
32 @element.className = 'hidden'
37 @tile = @statusBar.addRightTile(item: @container, priority: 20)